diff --git a/oqsprov/oqs_decode_der2key.c b/oqsprov/oqs_decode_der2key.c index 6bd71b71..89fa1569 100644 --- a/oqsprov/oqs_decode_der2key.c +++ b/oqsprov/oqs_decode_der2key.c @@ -731,26 +731,48 @@ MAKE_DECODER(, "rsa3072_sphincsshake128fsimple", rsa3072_sphincsshake128fsimple, MAKE_DECODER(, "rsa3072_sphincsshake128fsimple", rsa3072_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("dilithium3_rsa3072", dilithium3_rsa3072, oqsx, PrivateKeyInfo); -MAKE_DECODER("dilithium3_rsa3072", dilithium3_rsa3072, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("dilithium3_p256", dilithium3_p256, oqsx, PrivateKeyInfo); -MAKE_DECODER("dilithium3_p256", dilithium3_p256, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("falcon512_p256", falcon512_p256, oqsx, PrivateKeyInfo); -MAKE_DECODER("falcon512_p256", falcon512_p256, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("dilithium5_p384", dilithium5_p384, oqsx, PrivateKeyInfo); -MAKE_DECODER("dilithium5_p384", dilithium5_p384, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("dilithium3_bp256", dilithium3_bp256, oqsx, PrivateKeyInfo); -MAKE_DECODER("dilithium3_bp256", dilithium3_bp256, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("dilithium3_ed25519", dilithium3_ed25519, oqsx, PrivateKeyInfo); -MAKE_DECODER("dilithium3_ed25519", dilithium3_ed25519, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("dilithium5_bp384", dilithium5_bp384, oqsx, PrivateKeyInfo); -MAKE_DECODER("dilithium5_bp384", dilithium5_bp384, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("dilithium5_ed448", dilithium5_ed448, oqsx, PrivateKeyInfo); -MAKE_DECODER("dilithium5_ed448", dilithium5_ed448, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("falcon512_bp256", falcon512_bp256, oqsx, PrivateKeyInfo); -MAKE_DECODER("falcon512_bp256", falcon512_bp256, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("falcon512_ed25519", falcon512_ed25519, oqsx, PrivateKeyInfo); -MAKE_DECODER("falcon512_ed25519", falcon512_ed25519, oqsx, SubjectPublicKeyInfo); -MAKE_DECODER("dilithium3_pss", dilithium3_pss, oqsx, PrivateKeyInfo); -MAKE_DECODER("dilithium3_pss", dilithium3_pss, oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "dilithium3_rsa3072", dilithium3_rsa3072, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "dilithium3_rsa3072", dilithium3_rsa3072, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "dilithium3_p256", dilithium3_p256, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "dilithium3_p256", dilithium3_p256, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "falcon512_p256", falcon512_p256, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "falcon512_p256", falcon512_p256, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "dilithium5_p384", dilithium5_p384, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "dilithium5_p384", dilithium5_p384, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "dilithium3_bp256", dilithium3_bp256, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "dilithium3_bp256", dilithium3_bp256, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "dilithium3_ed25519", dilithium3_ed25519, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "dilithium3_ed25519", dilithium3_ed25519, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "dilithium5_bp384", dilithium5_bp384, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "dilithium5_bp384", dilithium5_bp384, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "dilithium5_ed448", dilithium5_ed448, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "dilithium5_ed448", dilithium5_ed448, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "falcon512_bp256", falcon512_bp256, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "falcon512_bp256", falcon512_bp256, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "falcon512_ed25519", falcon512_ed25519, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "falcon512_ed25519", falcon512_ed25519, + oqsx, SubjectPublicKeyInfo); +MAKE_DECODER(, "dilithium3_pss", dilithium3_pss, + oqsx, PrivateKeyInfo); +MAKE_DECODER(, "dilithium3_pss", dilithium3_pss, + oqsx, SubjectPublicKeyInfo); ///// OQS_TEMPLATE_FRAGMENT_DECODER_MAKE_END diff --git a/oqsprov/oqs_encode_key2any.c b/oqsprov/oqs_encode_key2any.c index 583a419b..5cfc0948 100644 --- a/oqsprov/oqs_encode_key2any.c +++ b/oqsprov/oqs_encode_key2any.c @@ -2051,70 +2051,70 @@ MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, PrivateKeyInfo, pem); MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, der); MAKE_ENCODER(, rsa3072_sphincsshake128fsimple, oqsx, SubjectPublicKeyInfo, pem); MAKE_TEXT_ENCODER(, rsa3072_sphincsshake128fsimple); -MAKE_ENCODER(dilithium3_rsa3072, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_rsa3072, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_rsa3072, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_rsa3072, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_rsa3072, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(dilithium3_rsa3072, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(dilithium3_p256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_p256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_p256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_p256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_p256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(dilithium3_p256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(falcon512_p256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(falcon512_p256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(falcon512_p256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(falcon512_p256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(falcon512_p256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(falcon512_p256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(dilithium5_p384, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(dilithium5_p384, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(dilithium5_p384, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(dilithium5_p384, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(dilithium5_p384, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(dilithium5_p384, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(dilithium3_bp256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_bp256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_bp256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_bp256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_bp256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(dilithium3_bp256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(dilithium3_ed25519, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_ed25519, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_ed25519, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_ed25519, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_ed25519, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(dilithium3_ed25519, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(dilithium5_bp384, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(dilithium5_bp384, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(dilithium5_bp384, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(dilithium5_bp384, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(dilithium5_bp384, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(dilithium5_bp384, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(dilithium5_ed448, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(dilithium5_ed448, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(dilithium5_ed448, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(dilithium5_ed448, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(dilithium5_ed448, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(dilithium5_ed448, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(falcon512_bp256, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(falcon512_bp256, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(falcon512_bp256, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(falcon512_bp256, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(falcon512_bp256, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(falcon512_bp256, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(falcon512_ed25519, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(falcon512_ed25519, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(falcon512_ed25519, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(falcon512_ed25519, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(falcon512_ed25519, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(falcon512_ed25519, oqsx, SubjectPublicKeyInfo, pem); -MAKE_ENCODER(dilithium3_pss, oqsx, EncryptedPrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_pss, oqsx, EncryptedPrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_pss, oqsx, PrivateKeyInfo, der); -MAKE_ENCODER(dilithium3_pss, oqsx, PrivateKeyInfo, pem); -MAKE_ENCODER(dilithium3_pss, oqsx, SubjectPublicKeyInfo, der); -MAKE_ENCODER(dilithium3_pss, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, dilithium3_rsa3072, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_rsa3072, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_rsa3072, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_rsa3072, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_rsa3072, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, dilithium3_rsa3072, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, dilithium3_p256, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_p256, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_p256, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_p256, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_p256, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, dilithium3_p256, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, falcon512_p256, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, falcon512_p256, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, falcon512_p256, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, falcon512_p256, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, falcon512_p256, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, falcon512_p256, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, dilithium5_p384, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, dilithium5_p384, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium5_p384, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, dilithium5_p384, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium5_p384, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, dilithium5_p384, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, dilithium3_bp256, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_bp256, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_bp256, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_bp256, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_bp256, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, dilithium3_bp256, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, dilithium3_ed25519, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_ed25519, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_ed25519, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_ed25519, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_ed25519, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, dilithium3_ed25519, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, dilithium5_bp384, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, dilithium5_bp384, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium5_bp384, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, dilithium5_bp384, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium5_bp384, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, dilithium5_bp384, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, dilithium5_ed448, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, dilithium5_ed448, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium5_ed448, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, dilithium5_ed448, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium5_ed448, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, dilithium5_ed448, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, falcon512_bp256, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, falcon512_bp256, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, falcon512_bp256, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, falcon512_bp256, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, falcon512_bp256, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, falcon512_bp256, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, falcon512_ed25519, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, falcon512_ed25519, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, falcon512_ed25519, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, falcon512_ed25519, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, falcon512_ed25519, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, falcon512_ed25519, oqsx, SubjectPublicKeyInfo, pem); +MAKE_ENCODER(, dilithium3_pss, oqsx, EncryptedPrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_pss, oqsx, EncryptedPrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_pss, oqsx, PrivateKeyInfo, der); +MAKE_ENCODER(, dilithium3_pss, oqsx, PrivateKeyInfo, pem); +MAKE_ENCODER(, dilithium3_pss, oqsx, SubjectPublicKeyInfo, der); +MAKE_ENCODER(, dilithium3_pss, oqsx, SubjectPublicKeyInfo, pem); ///// OQS_TEMPLATE_FRAGMENT_ENCODER_MAKE_END