*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> rijndael (9)              
Title
Content
Arch
Section
 

RIJNDAEL(9)

Contents


NAME    [Toc]    [Back]

     rijndael_makeKey, rijndael_cipherInit, rijndael_blockEncrypt,
     rijndael_padEncrypt, rijndael_blockDecrypt, rijndael_padDecrypt -- AES
     encryption

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <crypto/rijndael.h>

     int
     rijndael_makeKey(keyInstance *key, u_int8_t direction, int keyLen,
	 char *keyMaterial);

     int
     rijndael_cipherInit(cipherInstance *cipher, u_int8_t mode, char *IV);

     int
     rijndael_blockEncrypt(cipherInstance *cipher, keyInstance *key,
	 u_int8_t *input, int inputLen, u_int8_t *outBuffer);

     int
     rijndael_padEncrypt(cipherInstance *cipher, keyInstance *key,
	 u_int8_t *input, int inputOctets, u_int8_t *outBuffer);

     int
     rijndael_blockDecrypt(cipherInstance *cipher, keyInstance *key,
	 u_int8_t *input, int inputLen, u_int8_t *outBuffer);

     int
     rijndael_padDecrypt(cipherInstance *cipher, keyInstance *key,
	 u_int8_t *input, int inputOctets, u_int8_t *outBuffer);

DESCRIPTION    [Toc]    [Back]

     The rijndael_makeKey() function is used to set up the key schedule in
     key.  The direction (which may be DIR_ENCRYPT or DIR_DECRYPT) specifies
     the intended use of the key.  The length of the key (in bits) is given in
     keyLen, and must be 128, 192 or 256.  The actual key is supplied in the
     buffer pointed to by keyMaterial.	This material may be raw binary data,
     or an ASCII string containing a hexadecimal rendition of the raw binary
     data, dependent on a compile-time option in the rijndael_makeKey sources,
     BINARY_KEY_MATERIAL.

RETURN VALUES    [Toc]    [Back]

     The rijndael_makeKey() function will return BAD_KEY_INSTANCE if a NULL
     key is passed, BAD_KEY_DIR if direction is not DIR_ENCRYPT or
     DIR_DECRYPT, BAD_KEY_MAT if the key materials are not a hexadecimal
     string (and binary keys are not set), and TRUE otherwise.

AUTHORS    [Toc]    [Back]

     Mark R V Murray


FreeBSD 5.2.1		       February 6, 2002 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
des_key_sched Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_is_weak_key Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_quad_cksum Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_string_to_key Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_crypt Tru64 Data Encryption Standard (DES) encryption library routines (Auth)
des_crypt OpenBSD DES encryption
des_ede2_cbc_encrypt OpenBSD DES encryption
des_3ecb_encrypt OpenBSD (non USA) DES encryption
des_ecb_encrypt OpenBSD DES encryption
des_cbc_cksum OpenBSD DES encryption
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service