blob: 35d2a23fcd0b076bc468e5dbaadbe1717808cf44 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*
* Rivest's Package Tranform
*
* (C) 2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#include <botan/block_cipher.h>
#include <botan/rng.h>
namespace Botan {
namespace AllOrNothingTransform {
/**
* Rivest's Package Tranform
* @arg rng the random number generator to use
* @arg cipher the block cipher to use
* @arg input the input data buffer
* @arg input_len the length of the input data in bytes
* @arg output the output data buffer (must be at least
* input_len + cipher->BLOCK_SIZE bytes long)
*/
void package(RandomNumberGenerator& rng,
BlockCipher* cipher,
const byte input[], u32bit input_len,
byte output[]);
/**
* Rivest's Package Tranform (Inversion)
* @arg rng the random number generator to use
* @arg cipher the block cipher to use
* @arg input the input data buffer
* @arg input_len the length of the input data in bytes
* @arg output the output data buffer (must be at least
* input_len - cipher->BLOCK_SIZE bytes long)
*/
void unpackage(BlockCipher* cipher,
const byte input[], u32bit input_len,
byte output[]);
}
}
|