From 8f45c2409ca2f28f716f01d09047c6bb6f90d9b9 Mon Sep 17 00:00:00 2001 From: andreaP Date: Tue, 23 Dec 2014 15:38:51 +0100 Subject: proposal of documentation --- lib/crypto/doc/src/crypto.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'lib/crypto/doc/src/crypto.xml') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 271130a9e6..77cff252ef 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -169,7 +169,38 @@ + + block_encrypt(Type, Key, PlainText) -> CipherText + Encrypt PlainTextaccording to Type block cipher + + Type = des_ecb | blowfish_ecb | aes_ecb + Key = block_key() + PlainText = iodata() + + +

Encrypt PlainTextaccording to Type block cipher. +

May throw exception notsup in case the chosen Type + is not supported by the underlying OpenSSL implementation.

+
+
+ + block_decrypt(Type, Key, CipherText) -> PlainText + Decrypt CipherTextaccording to Type block cipher + + Type = des_ecb | blowfish_ecb | aes_ecb + Key = block_key() + PlainText = iodata() + + +

Decrypt CipherTextaccording to Type block cipher. +

May throw exception notsup in case the chosen Type + is not supported by the underlying OpenSSL implementation.

+
+
+ + + block_encrypt(Type, Key, Ivec, PlainText) -> CipherText block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} Encrypt PlainText according to Type block cipher -- cgit v1.2.3 From 395800d7d8bc0370cab4a69a81011da93f96af55 Mon Sep 17 00:00:00 2001 From: andreaP Date: Wed, 24 Dec 2014 09:51:21 +0100 Subject: fixed incorrect tag --- lib/crypto/doc/src/crypto.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/crypto/doc/src/crypto.xml') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 77cff252ef..092bb84cd9 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -199,7 +199,6 @@ - block_encrypt(Type, Key, Ivec, PlainText) -> CipherText block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} -- cgit v1.2.3 From 8ccf6b58c81a7b43b8f98584ed77e2d20dbce0bf Mon Sep 17 00:00:00 2001 From: andreaP Date: Wed, 7 Jan 2015 10:13:09 +0100 Subject: finally fixed docs --- lib/crypto/doc/src/crypto.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/crypto/doc/src/crypto.xml') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index 092bb84cd9..eff6129622 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -169,7 +169,7 @@ - + block_encrypt(Type, Key, PlainText) -> CipherText Encrypt PlainTextaccording to Type block cipher @@ -178,7 +178,7 @@ PlainText = iodata() -

Encrypt PlainTextaccording to Type block cipher. +

Encrypt PlainTextaccording to Type block cipher.

May throw exception notsup in case the chosen Type is not supported by the underlying OpenSSL implementation.

@@ -193,13 +193,13 @@ PlainText = iodata() -

Decrypt CipherTextaccording to Type block cipher. +

Decrypt CipherTextaccording to Type block cipher.

May throw exception notsup in case the chosen Type is not supported by the underlying OpenSSL implementation.

- + block_encrypt(Type, Key, Ivec, PlainText) -> CipherText block_encrypt(AeadType, Key, Ivec, {AAD, PlainText}) -> {CipherText, CipherTag} Encrypt PlainText according to Type block cipher -- cgit v1.2.3 From 6dbb25ea9c95b5101975e8ce60db65c219449266 Mon Sep 17 00:00:00 2001 From: andreaP Date: Thu, 8 Jan 2015 18:04:57 +0100 Subject: aligned implementation following last specs --- lib/crypto/doc/src/crypto.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/crypto/doc/src/crypto.xml') diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml index eff6129622..34de65217b 100644 --- a/lib/crypto/doc/src/crypto.xml +++ b/lib/crypto/doc/src/crypto.xml @@ -171,14 +171,14 @@ block_encrypt(Type, Key, PlainText) -> CipherText - Encrypt PlainTextaccording to Type block cipher + Encrypt PlainText according to Type block cipher Type = des_ecb | blowfish_ecb | aes_ecb Key = block_key() PlainText = iodata() -

Encrypt PlainTextaccording to Type block cipher.

+

Encrypt PlainText according to Type block cipher.

May throw exception notsup in case the chosen Type is not supported by the underlying OpenSSL implementation.

@@ -186,14 +186,14 @@ block_decrypt(Type, Key, CipherText) -> PlainText - Decrypt CipherTextaccording to Type block cipher + Decrypt CipherText according to Type block cipher Type = des_ecb | blowfish_ecb | aes_ecb Key = block_key() PlainText = iodata() -

Decrypt CipherTextaccording to Type block cipher.

+

Decrypt CipherText according to Type block cipher.

May throw exception notsup in case the chosen Type is not supported by the underlying OpenSSL implementation.

@@ -211,7 +211,7 @@ AAD = IVec = CipherText = CipherTag = binary() -

Encrypt PlainTextaccording to Type block cipher. +

Encrypt PlainText according to Type block cipher. IVec is an arbitrary initializing vector.

In AEAD (Authenticated Encryption with Associated Data) mode, encrypt PlainTextaccording to Type block cipher and calculate @@ -233,7 +233,7 @@ AAD = IVec = CipherText = CipherTag = binary() -

Decrypt CipherTextaccording to Type block cipher. +

Decrypt CipherText according to Type block cipher. IVec is an arbitrary initializing vector.

In AEAD (Authenticated Encryption with Associated Data) mode, decrypt CipherTextaccording to Type block cipher and check the authenticity -- cgit v1.2.3