Details
- Reviewers
cem jmg - Group Reviewers
manpages - Commits
- rGbc6265e8cf8d: ossl: Add Poly1305 digest support.
rGa079e38b08f2: ossl: Add Poly1305 digest support.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/crypto/openssl/ossl.c | ||
---|---|---|
180–183 | It seems like we have an extra nest level here. csp_auth_key != NULL should be true IFF csp_auth_klen != 0, and vice versa? (During newsession.) Nevermind, I guess we could be creating a keyed-hash session without any per-session key. | |
185–194 | The implication is that hash functions with a Setkey operation cannot be HMACs? That's probably fine. | |
231–232 | Why move opad initialization below instead of just doing it here? Avoid a copy? | |
sys/crypto/openssl/ossl.h | ||
41 | this feels brittle, although it's not a regression in this diff | |
sys/crypto/openssl/ossl_poly1305.c | ||
7 | What portions of this file are direct from openssl and what portions are novel? |
sys/crypto/openssl/ossl.c | ||
---|---|---|
185–194 |
Correct. | |
231–232 |
It overwrites the single ctx. Basically, we have a single auth ctx on the stack. We either copy it from a saved context when using session keys, or we generate the context on the fly when using per-op keys. Moving opad here would mean having to store two copies on the stack. | |
sys/crypto/openssl/ossl.h | ||
41 |
There are static assertions in each of the auth hash files that the context is big enough. The alternative of trying to include the relevant headers is a bit messy. | |
sys/crypto/openssl/ossl_poly1305.c | ||
144 | From here down is new, the #includes are new, and the explicit #define is new, the rest is from OpenSSL. |
sys/crypto/openssl/ossl.h | ||
---|---|---|
41 |
It's actually 32 byte alignment for AVX and is sufficient for everything currently. | |
sys/crypto/openssl/ossl_poly1305.c | ||
150–151 |
I can add that. |