Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
IOCryptoAcceleratorFamily - iPhone Development Wiki

IOCryptoAcceleratorFamily

From iPhone Development Wiki
Revision as of 08:50, 3 January 2010 by KennyTM~ (talk | contribs) (Created page with ''''IOCryptoAcceleratorFamily''' is a collection of kernel extensions that provide hardware-accelerated cryptographic functions, e.g. SHA1, AES, pseudo-random number generator (PR…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

IOCryptoAcceleratorFamily is a collection of kernel extensions that provide hardware-accelerated cryptographic functions, e.g. SHA1, AES, pseudo-random number generator (PRNG), etc.

You can use OpenSSL or CommonCrypto to do the same job without acceleration.

PRNG

Methods

Selector Action Input Output
0 info - struct IOPRNGAcceleratorInfo (12 bytes)
1 perform struct IOPRNGAcceleratorArg (8 bytes) struct IOPRNGAcceleratorArg (8 bytes)

where

struct IOPRNGAcceleratorInfo {
  unsigned type;  // ='RND0'
  uint8_t  x78x50[4];
  void*    reserved;
};

struct IOPRNGAcceleratorArg {
  void* data;
  size_t length;
};

SHA-1

Methods

Selector Action Input Output
0 info - 24 bytes of stuff
1 perform 40 bytes of stuff 40 bytes of stuff

AES

Methods

Selector Action Input Output
0 info - struct IOAESAcceleratorInfo (36 bytes)
1 perform struct IOAESAcceleratorArg (72 bytes) struct IOAESAcceleratorArg (72 bytes)
2 test - -

where

struct IOAESAcceleratorInfo {
  unsigned type;  // ='AES0'
  int      seven;
  uint8_t  x78x50[16];
  int      one_or_three;
  void*    reserved;
  unsigned x78x70;
};

struct IOAESAcceleratorArg {
  const void* in_data;
  void*       out_data;
  size_t      data_length;
  uint8_t     iv[16];
  bool        is_decrypt;
  int         aes_bits;  // 128, 224, 256
  uint8_t     key[32];
  int         special_keys;  // 1000 = gid-key, 2000 = uid-key, 2101 = securityd-key
};

PKE (Public key encryption)

Methods

Selector Action Input Output
0 info - 20 bytes of stuff
1 ? 44 bytes of stuff 44 bytes of stuff
2 ? 60 bytes of stuff 60 bytes of stuff