The Red Matrix
 All Classes Namespaces Files Functions Variables Pages
crypto.php File Reference

Functions

 rsa_sign ($data, $key, $alg= 'sha256')
 
 rsa_verify ($data, $sig, $key, $alg= 'sha256')
 
 DerToPem ($Der, $Private=false)
 
 DerToRsa ($Der)
 
 pkcs8_encode ($Modulus, $PublicExponent)
 
 pkcs1_encode ($Modulus, $PublicExponent)
 
 metopem ($m, $e)
 
 pubrsatome ($key, &$m, &$e)
 
 rsatopem ($key)
 
 pemtorsa ($key)
 
 pemtome ($key, &$m, &$e)
 
 metorsa ($m, $e)
 
 salmon_key ($pubkey)
 
if(!function_exists('aes_decrypt'))
if(!function_exists('aes_encrypt')) 
pkcs5_pad ($text, $blocksize)
 
 pkcs5_unpad ($text)
 
 AES256CBC_encrypt ($data, $key, $iv)
 
 AES256CBC_decrypt ($data, $key, $iv)
 
 aes_encapsulate ($data, $pubkey)
 
 aes_unencapsulate ($data, $prvkey)
 
 new_keypair ($bits)
 

Function Documentation

AES256CBC_decrypt (   $data,
  $key,
  $iv 
)

Referenced by aes_unencapsulate().

AES256CBC_encrypt (   $data,
  $key,
  $iv 
)

Referenced by aes_encapsulate().

aes_encapsulate (   $data,
  $pubkey 
)
aes_unencapsulate (   $data,
  $prvkey 
)
DerToPem (   $Der,
  $Private = false 
)

Referenced by metopem().

DerToRsa (   $Der)

Referenced by metorsa().

metopem (   $m,
  $e 
)

Referenced by rsatopem().

metorsa (   $m,
  $e 
)

Referenced by pemtorsa().

new_keypair (   $bits)

Referenced by create_identity(), and hostxrd_init().

pemtome (   $key,
$m,
$e 
)

Referenced by pemtorsa(), and salmon_key().

pemtorsa (   $key)
pkcs1_encode (   $Modulus,
  $PublicExponent 
)

Referenced by metorsa().

if (!function_exists('aes_decrypt')) if (!function_exists('aes_encrypt')) pkcs5_pad (   $text,
  $blocksize 
)

Referenced by AES256CBC_encrypt().

pkcs5_unpad (   $text)

Referenced by AES256CBC_decrypt().

pkcs8_encode (   $Modulus,
  $PublicExponent 
)

Referenced by metopem().

pubrsatome (   $key,
$m,
$e 
)

Referenced by rsatopem().

rsa_sign (   $data,
  $key,
  $alg = 'sha256' 
)
rsa_verify (   $data,
  $sig,
  $key,
  $alg = 'sha256' 
)
rsatopem (   $key)
salmon_key (   $pubkey)

Referenced by hostxrd_init(), and xrd_init().