Miroslav Lichvar
5a39074e01
nts: fix number of extension fields after failed encryption
...
If the authenticator SIV encryption fails (e.g. due to wrong nonce
length), decrement the number of extension fields to keep the packet
info consistent.
2022-10-19 15:50:39 +02:00
Miroslav Lichvar
73042494bd
nts: add support for NTP authenticator field using AES-GCM-SIV
...
Add support for SIV algorithms which have maximum nonce length shorter
than 16 bytes.
2022-10-19 15:50:39 +02:00
Miroslav Lichvar
9afd19c29b
nts: use signed lengths in NNA_DecryptAuthEF()
...
Make the types consistent with the rest of the file.
2022-10-19 15:50:39 +02:00
Miroslav Lichvar
d9a363606b
nts: reset packet length after failed auth encryption
...
If encryption of the NTS authenticator field fails, don't leave
uninitialized data in the packet in case a bug causes the packet to be
sent.
2020-09-23 15:10:43 +02:00
Miroslav Lichvar
d48f012809
nts: improve NTS-NTP server/client code
...
Add more comments, assertions, debug messages, and other minor
changes to make the code more robust.
2020-07-28 12:48:23 +02:00
Miroslav Lichvar
de4ecc72d1
nts: don't assume field position in NNA_DecryptAuthEF()
...
Modify NNA_DecryptAuthEF() to not assume that the authenticator is the
last extension field in the packet as some extension fields specified in
future may need to be placed after the authenticator. The caller of the
function is supposed to verify the position.
2020-07-09 14:47:33 +02:00
Miroslav Lichvar
db54bfc0c1
nts: check for negative length in NNA_DecryptAuthEF()
...
As other functions that accept a signed length, make sure it is sane in
NNA_DecryptAuthEF() too.
2020-07-09 14:47:33 +02:00
Miroslav Lichvar
6043632f80
nts: add NTS-NTP server and client
...
Add support for the NTS NTP extension fields.
2020-03-05 16:02:15 +01:00