group::CRYPT

This is the interface for accessing cryptographic hardware.

Details

defineCRYPT_VERSION


defineCRYPT_IOC_CHAR


defineI_CRYPT_GETVERSION


defineI_CRYPT_GETINFO

This request reads the random generator information.

Example:

crypt_info_t info;
ioctl(fildes, I_CRYPT_GETINFO, &info);

defineI_CRYPT_SETATTR

Requests the hardware to write the random generator attributes.

Example:

crypt_attr_t attr;
attr.o_flags = CRYPT_FLAG_SET_SEED;
attr.seed = 10;
ioctl(fildes, I_CRYPT_SETATTR, &attr);

enum@7

  • CRYPT_FLAG_SET_CIPHER Sets the current cipher attributes
  • CRYPT_FLAG_IS_AES_ECB Sets the cipher to AES ECB
  • CRYPT_FLAG_IS_AES_CBC Sets the cipher to AES CBC
  • CRYPT_FLAG_IS_AES_CTR Sets the cipher to AES CTR
  • CRYPT_FLAG_IS_AES_GCM Sets the cipher to AES GCM
  • CRYPT_FLAG_IS_AES_CCM Sets the cipher to AES GCM
  • CRYPT_FLAG_IS_AES_128 Sets the cipher to a 128-bit key
  • CRYPT_FLAG_IS_AES_192 Sets the cipher to a 128-bit key
  • CRYPT_FLAG_IS_AES_256 Sets the cipher to a 128-bit key
  • CRYPT_FLAG_IS_DATA_1 Sets the data size to a 1-bit string
  • CRYPT_FLAG_IS_DATA_8 Sets the data size to a 8-bits
  • CRYPT_FLAG_IS_DATA_16 Sets the data size to a 16-bits
  • CRYPT_FLAG_IS_DATA_32 Sets the data size to a 32-bits
  • CRYPT_FLAG_SET_MODE Sets the cipher to encryption mode for use with CRYPT_FLAG_IS_ENCRYPT or CRYPT_FLAG_IS_DECRYPT
  • CRYPT_FLAG_IS_ENCRYPT Sets the cipher to encryption mode for use with CRYPT_FLAG_SET_MODE
  • CRYPT_FLAG_IS_DECRYPT Sets the cipher to decryption mode for use with CRYPT_FLAG_SET_MODE


date: “2019-06-27” layout: post title: struct::crypt_info_t katex: true

categories: struct

Methods

Details

public u32o_flags

Bitwise flags


public u8max_header_size


public u32resd



date: “2019-06-27” layout: post title: struct::crypt_attr_t katex: true

categories: struct

Methods

Details

public u32o_flags

Bitwise flags


public u8key

encryption key up to 256 bits


public u8iv

initialization vector up to 256 bits


public u8iv_size


public u8header_size


public u32resd


X

Thanks for Coming!

Subscribe to news and updates