diff --git a/examples/rsa-encrypt.c b/examples/rsa-encrypt.c index 0e9ab59cae7df52378980b63b0411661a9cbb6bc..e3f3c351b0e6a5864f7aab93d566ccb54d56733d 100644 --- a/examples/rsa-encrypt.c +++ b/examples/rsa-encrypt.c @@ -21,32 +21,6 @@ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ - -/* Encryption program using the following file format: - - uint32_t version = 1; - uint32_t xsize; - uint8_t x[xsize]; - uint8_t encrypted[n]; - uint8_t hmac[SHA1_DIGEST_SIZE]; - - "x" is the data - - uint32_t version = 1; - uint8_t aes_key[AES_KEY_SIZE]; - uint8_t iv[AES_BLOCK_SIZE]; - uint8_t hmac_key[SHA1_DIGEST_SIZE]; - - of size (4 + AES_KEY_SIZE + AES_BLOCK_SIZE + SHA1_DIGEST_SIZE) = 72 - bytes, encrypted using rsa-pkcs1. - - "encrypted" is the cleartext processed with aes-cbc. The final block is padded as - - | data | random octets | padding length | - - where the last octet is the padding length, a number between 1 and - AES_BLOCK_SIZE (inclusive). -*/ #if HAVE_CONFIG_H # include "config.h" diff --git a/examples/rsa-session.h b/examples/rsa-session.h index 7e161c81804e8061cb18aefc18ac6f9d7af0a982..44b85ec70e6611aef1d7b4985bbec9c59a7d0c32 100644 --- a/examples/rsa-session.h +++ b/examples/rsa-session.h @@ -27,6 +27,14 @@ of size (4 + AES_KEY_SIZE + AES_BLOCK_SIZE + SHA1_DIGEST_SIZE) = 72 bytes, encrypted using rsa-pkcs1. + + The cleartext input is encrypted using aes-cbc. The final block is + padded as + + | data | random octets | padding length | + + where the last octet is the padding length, a number between 1 and + AES_BLOCK_SIZE (inclusive). */ struct rsa_session