| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
RFC 5915 mandates that the OID of an ECDSA ECPrivateKey
shall be id-ecPublicKey with the named curve as the parameters.
ECPrivateKey may contain the named curve OID, too, which is
compared to id-ecPublicKey. Such keys could not be loaded.
We remove this check and add a test vector from strongswan.
|
|/ |
|
|
|
|
|
|
|
|
| |
Unfortunately it seems the SM2 format changed between 2010 and 2012,
now the ciphertext is C1 || C3 || C2.
Unfortunate no matter how you slice it, but at least it's easy to
convert from one form to another.
|
|
|
|
| |
This is a contribution from Ribose Inc
|
|
|
|
|
|
|
|
|
|
| |
GCC and Clang generate effectively identical code for a template
with parameters, vs completely unrolled code as was used previously.
Add a little-endian variant so XTS can use it. This extends XTS support
to cover 256 and 512-bit ciphers. I was not able to find another
implementation that supports both XTS and ciphers with large blocks,
so the XTS test vectors are self-generated.
|
|
|
|
| |
Closes #1168
|
|
|
|
| |
[ci skip]
|
|
|
|
| |
All of these values were imported into crypto-corpus repo
|
| |
|
|
|
|
| |
Remove NEON support, replace macros with inlines
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This confirms the message is exactly the size of the expected hash,
and also causes RFC 6979 nonces to be generated using the specified
hash. See also https://github.com/riboseinc/rnp/issues/367
|
|\ |
|
| |
| |
| |
| | |
Bit over 2x faster on my desktop
|
| |
| |
| |
| | |
256 bit ARX block cipher with hardware support, what's not to love.
|
|/
|
|
|
|
|
|
|
| |
Now does 64-bits at a time instead of 8 bits, and avoids conditional
timing channel on the XOR carry. Confirmed that at least GCC 7 and
Clang 4 on x86-64 compile the functions without conditional jumps.
Also removes CMAC as a dependency of OCB, which only needed it in
order to call CMAC::poly_double
|
|
|
|
|
| |
The tests were generated by Botan but I was able to verify the
resulting signatures using Golang's ecdsa module.
|
|\ |
|
| |
| |
| |
| | |
This is a contribution from Ribose Inc (@riboseinc)
|
|\ \
| |/
|/| |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
From https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02
This is a contribution from Ribose Inc (@riboseinc).
|
|
|
|
| |
This work was sponsored by Ribose Inc
|
| |
|
| |
|
|
|
|
| |
This work was sponsored by Ribose Inc
|
|
|
|
|
|
|
|
| |
In simple mode (no salt) with an empty password the input buffer
is empty.
Add a check that salt is not empty if iterations > 1 since PGP
only has simple, salted, and iterated+salted modes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was removed somewhere along the line in 1.11, with the logic
that it is a funky PGP-specific scheme and (quoting the commit
that removed it) "not really useful outside of a full PGP implementation".
This assumed that the PGP implementation would be in Botan itself, but
PGP is implemented in https://github.com/evpo/EncryptPad/ (which is
a PGP implementation using 1.10), and RNP (https://github.com/riboseinc/rnp)
would like to use it also.
This work was sponsored by Ribose Inc (@riboseinc).
|
|\ |
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix for new define syntax, remove old style casts.
Add some randomly generated longer SHA-256 vectors, previously had
precisely zero multiblock tests.
|
| |/
| |
| |
| | |
Based on patch from Jeffrey Walton in GH #841
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes GH #991
The problem with the current implementation of the chain validation code is that is runs from the end certificate to the trust cert.
@securitykernel and me tried to fix the pathLenConstraint validation within this reverse loop but we were not sure if we missed some edge cases.
So we felt safer to use the algorithm listed in RFC 5280 which executes from the top to the bottom. It's probably best to rewrite the code to use the whole algorithm from RFC 5280, i.e. validating the chain from the trust to the end cert.
Additionally, we wrote some tests including the one that raised this issue initially.
|
| |
| |
| |
| | |
Based on GH #807 and #808
|
|\ \ |
|
| |/
| |
| |
| |
| |
| | |
Extend EMSA_PKCS1v15_Raw to optionally take a hash function for which
the PKCS hash id is prefixed to the message as usual. This allows signing
a message using PKCSv1.5 padding where the hash is provided externally.
|
|/
|
|
|
|
| |
Allow an empty nonce to mean "continue using the current cipher state".
GH #864
|
| |
|