version 1.53, 2002/03/18 17:13:15 |
version 1.54, 2002/03/19 10:49:35 |
|
|
|
|
/*--*/ |
/*--*/ |
|
|
u_int |
u_int |
cipher_blocksize(Cipher *c) |
cipher_blocksize(Cipher *c) |
{ |
{ |
return (c->block_size); |
return (c->block_size); |
} |
} |
u_int |
u_int |
cipher_keylen(Cipher *c) |
cipher_keylen(Cipher *c) |
{ |
{ |
return (c->key_len); |
return (c->key_len); |
} |
} |
u_int |
u_int |
cipher_get_number(Cipher *c) |
cipher_get_number(Cipher *c) |
{ |
{ |
return (c->number); |
return (c->number); |
|
|
return (&rijndal_cbc); |
return (&rijndal_cbc); |
} |
} |
|
|
/* |
/* |
* Exports an IV from the CipherContext required to export the key |
* Exports an IV from the CipherContext required to export the key |
* state back from the unprivileged child to the privileged parent |
* state back from the unprivileged child to the privileged parent |
* process. |
* process. |
|
|
memcpy(desc->k2.iv, iv + 8, 8); |
memcpy(desc->k2.iv, iv + 8, 8); |
memcpy(desc->k3.iv, iv + 16, 8); |
memcpy(desc->k3.iv, iv + 16, 8); |
return; |
return; |
} |
} |
default: |
default: |
fatal("%s: bad cipher %d", __FUNCTION__, c->number); |
fatal("%s: bad cipher %d", __FUNCTION__, c->number); |
} |
} |