linux/crypto/asymmetric_keys
Lukas Wunner b04163863c crypto: ecdsa - Support P1363 signature decoding
Alternatively to the X9.62 encoding of ecdsa signatures, which uses
ASN.1 and is already supported by the kernel, there's another common
encoding called P1363.  It stores r and s as the concatenation of two
big endian, unsigned integers.  The name originates from IEEE P1363.

Add a P1363 template in support of the forthcoming SPDM library
(Security Protocol and Data Model) for PCI device authentication.

P1363 is prescribed by SPDM 1.2.1 margin no 44:

   "For ECDSA signatures, excluding SM2, in SPDM, the signature shall be
    the concatenation of r and s.  The size of r shall be the size of
    the selected curve.  Likewise, the size of s shall be the size of
    the selected curve.  See BaseAsymAlgo in NEGOTIATE_ALGORITHMS for
    the size of r and s.  The byte order for r and s shall be in big
    endian order.  When placing ECDSA signatures into an SPDM signature
    field, r shall come first followed by s."

Link: https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.2.1.pdf
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2024-10-05 13:22:05 +08:00
..
asymmetric_keys.h
asymmetric_type.c KEYS: prevent NULL pointer dereference in find_asymmetric_key() 2024-09-20 19:49:49 +03:00
Kconfig certs: Add ECDSA signature verification self-test 2024-05-14 05:01:04 +03:00
Makefile certs: Add ECDSA signature verification self-test 2024-05-14 05:01:04 +03:00
mscode_parser.c Revert "crypto: pkcs7 - remove sha1 support" 2024-03-22 19:42:20 +08:00
mscode.asn1
pkcs7_key_type.c
pkcs7_parser.c crypto: sm2 - Remove sm2 algorithm 2024-06-07 19:46:39 +08:00
pkcs7_parser.h
pkcs7_trust.c
pkcs7_verify.c
pkcs7.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
pkcs8_parser.c
pkcs8.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
public_key.c crypto: ecdsa - Support P1363 signature decoding 2024-10-05 13:22:05 +08:00
restrict.c certs: Only allow certs signed by keys on the builtin keyring 2023-10-31 08:22:36 -04:00
selftest_ecdsa.c certs: Add ECDSA signature verification self-test 2024-05-14 05:01:04 +03:00
selftest_rsa.c certs: Move RSA self-test data to separate file 2024-05-14 05:01:03 +03:00
selftest.c certs: Add ECDSA signature verification self-test 2024-05-14 05:01:04 +03:00
selftest.h certs: Add ECDSA signature verification self-test 2024-05-14 05:01:04 +03:00
signature.c Revert "crypto: pkcs7 - remove sha1 support" 2024-03-22 19:42:20 +08:00
verify_pefile.c crypto: asymmetric_keys - remove redundant pointer secs 2024-01-26 16:39:32 +08:00
verify_pefile.h
x509_akid.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00
x509_cert_parser.c crypto: sm2 - Remove sm2 algorithm 2024-06-07 19:46:39 +08:00
x509_loader.c
x509_parser.h X.509: Introduce scope-based x509_certificate allocation 2024-04-12 15:07:53 +08:00
x509_public_key.c crypto: sm2 - Remove sm2 algorithm 2024-06-07 19:46:39 +08:00
x509.asn1 treewide: Add SPDX identifier to IETF ASN.1 modules 2023-10-27 18:04:28 +08:00