This document specifies the Javascript interface to [[!RingLWE]], which is a fast and post-quantum public key cryptosystem jointly implemented by KDDI R&D Laboratories and Kyushu University.

This document is in a very draft stage. It needs to be updated with appropriate key parameters for the Ring-LWE cryptosystem, for which the W3C WebCryto specifications may or may not be sufficient. Once it is updated, the status of this document will be set to waiting for implementations of Ring-LWE from UserAgent vendors.

Description

The "RLWE" algorithm identifier is used to perform encryption and decryption using Ring-LWE, as described in [[RingLWE]].

Registration

The recognized algorithm name for this algorithm is "RLWE".

Operation Parameters Result
encrypt RLWEEncryptionParameters ArrayBuffer
decrypt RLWEDecryptionParameters ArrayBuffer
generateKey RLWEKeyGenParameters CryptoKeyPair
importKey None CryptoKey
exportKey None object

Parameters

RLWEEncryptionParameters dictionary

RLWEDecryptionParameters dictionary

			dictionary RLWEDecryptionParameters : Algorithm {
			required BufferSource ciphertext; 
			};
			

RLWEKeyGenParameters dictionary

			dictionary RLWEKeyGenParameters : Algorithm {
			[EnforceRange] required unsigned short dimension;
			[EnforceRange] required unsigned long modulo;
			[EnforceRange] required double error;
			};
			

Operations

Encrypt

  1. If the type member of public then throw an InvalidAccessError.
  2. Let ciphertext be the result of performing the Encryption operation described in [[RingLWE]] using Ring-LWE as the cryptosystem and plaintext as the input plaintext.
  3. Return ciphertext.

Decrypt

  1. If the type member of private then throw an InvalidAccessError.
  2. Let plaintext be the result of performing the Decryption operation described in [[RingLWE]] using Ring-LWE as the cryptosystem and ciphertext as the input ciphertext.
  3. Return plaintext.

Generate Key

  1. See notes in the HTML document. To be updated.

Import Key

  1. To be updated according to [[!RSADraft]].