| 390 | ****************************************************************************/ |
| 391 | |
| 392 | struct cipher *cipher_init(uint8_t * key, uint8_t * iv) |
| 393 | { |
| 394 | struct cipher *c; |
| 395 | |
| 396 | c = malloc(sizeof(*c)); |
| 397 | if (!c) |
| 398 | { |
| 399 | return NULL; |
| 400 | } |
| 401 | |
| 402 | c->round = clefiakeyset(c->rk, key); |
| 403 | |
| 404 | gen_subkey(c); |
| 405 | memset(c->vector, 0, 16); |
| 406 | |
| 407 | return c; |
| 408 | } |
| 409 | |
| 410 | void cipher_deinit(struct cipher *c) |
| 411 | { |
no test coverage detected