aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/crypto/iv
Commit message (Collapse)AuthorAgeFilesLines
* Use standard unsigned integer typesAndreas Steffen2016-03-244-21/+21
|
* iv-gen: Use NULL IV generator for NULL encryptionTobias Brunner2015-11-091-0/+5
| | | | | | | | | | | | We don't need an IV for NULL encryption, so we wouldn't technically need an IV generator. But some of the code currently relies on an IV generator to be present. So we don't have to change that code and handle IV size == 0 specially we use the new NULL IV generator, which handles this transparently to the existing code. Before 3c81cb6fc322 ("aead: Create AEAD using traditional transforms with an explicit IV generator") iv_gen_rand_t was used for NULL encryption, which would work too but this way it's clearer.
* crypto: Add NULL IV generatorTobias Brunner2015-11-092-0/+95
| | | | | This does not actually allocate an IV and only accepts requests for size == 0.
* crypter: Define a ChaCha20/Poly1305 AEAD algorithm identifierMartin Willi2015-06-291-0/+1
|
* ivgen: Allow reusing the same message ID twice in sequential IV genMartin Willi2015-06-051-7/+25
| | | | | | | | | | | | We use the message ID and fragment number as IV generator. As IKEv2 uses distinct message ID counters for actively and passively initiated exchanges, each IV would be used twice. As we explicitly reject such message IDs since d0ed1079, original-responder initiated exchanges fail with counter mode ciphers. This commit separates IV space in two halves for sequential IVs, and automatically assigns once reused sequence numbers to the second half. Fixes #980.
* iv-gen: Fail getting shorter IV values than the used counter sizeMartin Willi2015-06-011-0/+4
| | | | | While no algorithm actually uses such short IVs, we add a check here to ensure we won't return just the lower bits of the counter.
* iv-gen: Ensure external sequential IVs are actually sequentialMartin Willi2015-06-012-0/+23
| | | | We allow gaps in IVs, but ensure that an IV is never used more than once.
* iv-gen: Add a generic constructor to create an IV gen from an algorithmMartin Willi2015-04-132-0/+69
|
* iv_gen: Mask sequential IVs with a random saltTobias Brunner2013-10-111-0/+24
| | | | | This makes it harder to attack a HA setup, even if the sequence numbers were not fully in sync.
* iv_gen: Provide external sequence number (IKE, ESP)Tobias Brunner2013-10-113-17/+10
| | | | This prevents duplicate sequential IVs in case of a HA failover.
* iv_gen: Add IV generator that allocates IVs sequentiallyTobias Brunner2013-10-112-0/+119
|
* iv_gen: Add IV generator that allocates IVs randomlyTobias Brunner2013-10-112-0/+111
| | | | Uses RNG_WEAK as the code currently does elsewhere to allocate IVs.
* crypto: Add generic interface for IV generatorsTobias Brunner2013-10-111-0/+59