diff --git a/doc/global.html b/doc/global.html
index e78218e7..db1fa8dd 100644
--- a/doc/global.html
+++ b/doc/global.html
@@ -91,7 +91,7 @@
-
-
openpgp_crypto_asymetricDecrypt(algo, publicMPIs, secretMPIs, data) → {BigInteger}
+ openpgp_crypto_symmetricDecrypt(algo, key, data, openpgp_cfb) → {String}
@@ -99,1749 +99,8 @@
- Decrypts data using the specified public key multiprecision integers of the private key,
-the specified secretMPIs of the private key and the specified algorithm.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- algo |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Algorithm to be used (See RFC4880 9.1) |
-
-
-
-
-
-
- publicMPIs |
-
-
-
-
-
-openpgp_type_mpi[]
-
-
-
- |
-
-
-
-
-
- Algorithm dependent multiprecision integers
-of the public key part of the private key |
-
-
-
-
-
-
- secretMPIs |
-
-
-
-
-
-openpgp_type_mpi[]
-
-
-
- |
-
-
-
-
-
- Algorithm dependent multiprecision integers
-of the private key used |
-
-
-
-
-
-
- data |
-
-
-
-
-
-openpgp_type_mpi
-
-
-
- |
-
-
-
-
-
- Data to be encrypted as MPI |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- returns a big integer containing the decrypted data; otherwise null
-
-
-
-
-
- -
- Type
-
- -
-
-BigInteger
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_asymetricEncrypt(algo, publicMPIs, data) → {openpgp_type_mpi|Array.<openpgp_type_mpi>}
-
-
-
--
-
-
-
- Encrypts data using the specified public key multiprecision integers
-and the specified algorithm.
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- algo |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Algorithm to be used (See RFC4880 9.1) |
-
-
-
-
-
-
- publicMPIs |
-
-
-
-
-
-openpgp_type_mpi[]
-
-
-
- |
-
-
-
-
-
- Algorithm dependent multiprecision integers |
-
-
-
-
-
-
- data |
-
-
-
-
-
-openpgp_type_mpi
-
-
-
- |
-
-
-
-
-
- Data to be encrypted as MPI |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- if RSA an openpgp_type_mpi;
-if elgamal encryption an array of two openpgp_type_mpi is returned; otherwise null
-
-
-
-
-
- -
- Type
-
- -
-
-openpgp_type_mpi
-|
-
-Array.<openpgp_type_mpi>
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_generateKeyPair(keyType, numBits) → {openpgp_keypair}
-
-
-
--
-
-
-
- Calls the necessary crypto functions to generate a keypair.
-Called directly by openpgp.js
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- keyType |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Follows OpenPGP algorithm convention. |
-
-
-
-
-
-
- numBits |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Number of bits to make the key to be generated |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
-
-
- -
- Type
-
- -
-
-openpgp_keypair
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_generateSessionKey(algo) → {String}
-
-
-
--
-
-
-
- Generating a session key for the specified symmetric algorithm
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- algo |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Algorithm to use (see RFC4880 9.2) |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- Random bytes as a string to be used as a key
-
-
-
-
-
- -
- Type
-
- -
-
-String
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_getHashByteLength(algo) → {Integer}
-
-
-
--
-
-
-
- Returns the hash size in bytes of the specified hash algorithm type
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- algo |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Hash algorithm type (See RFC4880 9.4) |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- Size in bytes of the resulting hash
-
-
-
-
-
- -
- Type
-
- -
-
-Integer
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_getPrefixRandom(algo) → {String}
-
-
-
--
-
-
-
- generate random byte prefix as string for the specified algorithm
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- algo |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Algorithm to use (see RFC4880 9.2) |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- Random bytes with length equal to the block
-size of the cipher
-
-
-
-
-
- -
- Type
-
- -
-
-String
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_getPseudoRandom(from, to) → {Integer}
-
-
-
--
-
-
-
- Return a pseudo-random number in the specified range
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- from |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Min of the random number |
-
-
-
-
-
-
- to |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Max of the random number (max 32bit) |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- A pseudo random number
-
-
-
-
-
- -
- Type
-
- -
-
-Integer
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_getRandomBigInteger(bits) → {BigInteger}
-
-
-
--
-
-
-
- Create a secure random big integer of bits length
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- bits |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Bit length of the MPI to create |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- Resulting big integer
-
-
-
-
-
- -
- Type
-
- -
-
-BigInteger
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_getRandomBytes(length) → {String}
-
-
-
--
-
-
-
- Retrieve secure random byte string of the specified length
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- length |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Length in bytes to generate |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- Random byte string
-
-
-
-
-
- -
- Type
-
- -
-
-String
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_getSecureRandom(from, to) → {Integer}
-
-
-
--
-
-
-
- Return a secure random number in the specified range
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- from |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Min of the random number |
-
-
-
-
-
-
- to |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Max of the random number (max 32bit) |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- A secure random number
-
-
-
-
-
- -
- Type
-
- -
-
-Integer
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_hashData(algo, data) → {String}
-
-
-
--
-
-
-
- Create a hash on the specified data using the specified algorithm
-
-
-
-
-
-
-
-
- Parameters:
-
-
-
-
-
-
- Name |
-
-
- Type |
-
-
-
-
-
- Description |
-
-
-
-
-
-
-
-
- algo |
-
-
-
-
-
-Integer
-
-
-
- |
-
-
-
-
-
- Hash algorithm type (see RFC4880 9.4) |
-
-
-
-
-
-
- data |
-
-
-
-
-
-String
-
-
-
- |
-
-
-
-
-
- Data to be hashed |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Returns:
-
-
-
- hash value
-
-
-
-
-
- -
- Type
-
- -
-
-String
-
-
-
-
-
-
-
-
-
-
-
-
--
-
openpgp_crypto_MDCSystemBytes(algo, key, data) → {String}
-
-
-
--
-
-
-
- retrieve the MDC prefixed bytes by decrypting them
+ Symmetrically decrypts data using a key with length depending on the
+algorithm in openpgp_cfb mode with or without resync (MDC style)
@@ -1937,7 +196,31 @@ size of the cipher
- Encrypted data where the prefix is decrypted from |
+ Data to be decrypted |
+
+
+
+
+
+
+ openpgp_cfb |
+
+
+
+
+
+Boolean
+
+
+
+ |
+
+
+
+
+
+ If true use the resync (for encrypteddata);
+otherwise use without the resync (for MDC encrypted data) |
@@ -1968,7 +251,7 @@ size of the cipher
- Source:
@@ -1993,7 +276,7 @@ size of the cipher
- Plain text data of the prefixed data
+ Plaintext data
@@ -2018,7 +301,7 @@ size of the cipher
-
-
openpgp_crypto_signData(hash_algo, algo, publicMPIs, secretMPIs, data) → {String|openpgp_type_mpi}
+ openpgp_crypto_symmetricEncrypt(prefixrandom, algo, key, data, openpgp_cfb) → {String}
@@ -2026,7 +309,9 @@ size of the cipher
- Create a signature on data using the specified algorithm
+ Symmetrically encrypts data using prefixedrandom, a key with length
+depending on the algorithm in openpgp_cfb mode with or without resync
+(MDC style)
@@ -2060,13 +345,13 @@ size of the cipher
- hash_algo |
+ prefixrandom |
-Integer
+String
@@ -2076,7 +361,9 @@ size of the cipher
- | hash Algorithm to use (See RFC4880 9.4) |
+ Secure random bytes as string in
+length equal to the block size of the algorithm used (use
+openpgp_crypto_getPrefixRandom(algo) to retrieve that string |
@@ -2099,20 +386,20 @@ size of the cipher
- Asymmetric cipher algorithm to use (See RFC4880 9.1) |
+ Algorithm to use (see RFC4880 9.2) |
- publicMPIs |
+ key |
-openpgp_type_mpi[]
+String
@@ -2122,32 +409,7 @@ size of the cipher
- | Public key multiprecision integers
-of the private key |
-
-
-
-
-
-
- secretMPIs |
-
-
-
-
-
-openpgp_type_mpi[]
-
-
-
- |
-
-
-
-
-
- Private key multiprecision
-integers which is used to sign the data |
+ Key as string. length is depending on the algorithm used |
@@ -2170,7 +432,30 @@ integers which is used to sign the data
- Data to be signed |
+ Data to encrypt |
+
+
+
+
+
+
+ openpgp_cfb |
+
+
+
+
+
+Boolean
+
+
+
+ |
+
+
+
+
+
+ |
@@ -2201,233 +486,7 @@ integers which is used to sign the data
- Source:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-