Skip to content

Commit

Permalink
changed composite dilithium to ML-*
Browse files Browse the repository at this point in the history
  • Loading branch information
feventura committed Mar 16, 2024
1 parent 833b517 commit be2ae6a
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 779 deletions.
10 changes: 0 additions & 10 deletions ALGORITHMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,8 @@ adapting the OIDs of all supported signature algorithms as per the table below.
| dilithium2 | 1.3.6.1.4.1.2.267.7.4.4 |Yes| OQS_OID_DILITHIUM2
| p256_dilithium2 | 1.3.9999.2.7.1 |Yes| OQS_OID_P256_DILITHIUM2
| rsa3072_dilithium2 | 1.3.9999.2.7.2 |Yes| OQS_OID_RSA3072_DILITHIUM2
| dilithium2_pss2048 | 2.16.840.1.114027.80.8.1.1 |Yes| OQS_OID_DILITHIUM2_pss2048
| dilithium2_rsa2048 | 2.16.840.1.114027.80.8.1.2 |Yes| OQS_OID_DILITHIUM2_rsa2048
| dilithium2_ed25519 | 2.16.840.1.114027.80.8.1.3 |Yes| OQS_OID_DILITHIUM2_ed25519
| dilithium2_p256 | 2.16.840.1.114027.80.8.1.4 |Yes| OQS_OID_DILITHIUM2_p256
| dilithium2_bp256 | 2.16.840.1.114027.80.8.1.5 |Yes| OQS_OID_DILITHIUM2_bp256
| dilithium3 | 1.3.6.1.4.1.2.267.7.6.5 |Yes| OQS_OID_DILITHIUM3
| p384_dilithium3 | 1.3.9999.2.7.3 |Yes| OQS_OID_P384_DILITHIUM3
| dilithium3_pss3072 | 2.16.840.1.114027.80.8.1.6 |Yes| OQS_OID_DILITHIUM3_pss3072
| dilithium3_rsa3072 | 2.16.840.1.114027.80.8.1.7 |Yes| OQS_OID_DILITHIUM3_rsa3072
| dilithium3_p256 | 2.16.840.1.114027.80.8.1.8 |Yes| OQS_OID_DILITHIUM3_p256
| dilithium3_bp256 | 2.16.840.1.114027.80.8.1.9 |Yes| OQS_OID_DILITHIUM3_bp256
| dilithium3_ed25519 | 2.16.840.1.114027.80.8.1.10 |Yes| OQS_OID_DILITHIUM3_ed25519
| dilithium5 | 1.3.6.1.4.1.2.267.7.8.7 |Yes| OQS_OID_DILITHIUM5
| p521_dilithium5 | 1.3.9999.2.7.4 |Yes| OQS_OID_P521_DILITHIUM5
| mldsa44 | 1.3.6.1.4.1.2.267.12.4.4 |Yes| OQS_OID_MLDSA44
Expand Down
52 changes: 0 additions & 52 deletions oqs-template/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -477,26 +477,6 @@ sigs:
'pretty_name': 'RSA3072',
'oid': '1.3.9999.2.7.2',
'code_point': '0xfea2'}]
composite: [{'name': 'pss2048',
'pretty_name': 'RSA PSS 2048',
'security': '112',
'oid': '2.16.840.1.114027.80.8.1.1'},
{'name': 'rsa2048',
'pretty_name': 'RSA2028',
'security': '112',
'oid': '2.16.840.1.114027.80.8.1.2'},
{'name': 'ed25519',
'pretty_name': 'ED25519',
'security': '128',
'oid': '2.16.840.1.114027.80.8.1.3'},
{'name': 'p256',
'pretty_name': 'ECDSA p256',
'security': '128',
'oid': '2.16.840.1.114027.80.8.1.4'},
{'name': 'bp256',
'pretty_name': 'ECDSA brainpoolP256r1',
'security': '256',
'oid': '2.16.840.1.114027.80.8.1.5'}]
-
name: 'dilithium3'
pretty_name: 'Dilithium3'
Expand All @@ -509,26 +489,6 @@ sigs:
'pretty_name': 'ECDSA p384',
'oid': '1.3.9999.2.7.3',
'code_point': '0xfea4'}]
composite: [{'name': 'pss3072',
'pretty_name': 'RSA PSS 3072',
'security': '128',
'oid': '2.16.840.1.114027.80.8.1.6'},
{'name': 'rsa3072',
'pretty_name': 'RSA 3072',
'security': '128',
'oid': '2.16.840.1.114027.80.8.1.7'},
{'name': 'p256',
'pretty_name': 'ECDSA p256',
'security': '128',
'oid': '2.16.840.1.114027.80.8.1.8'},
{'name': 'bp256',
'pretty_name': 'ECDSA brainpoolP256r1',
'security': '256',
'oid': '2.16.840.1.114027.80.8.1.9'},
{'name': 'ed25519',
'pretty_name': 'ED25519',
'security': '128',
'oid': '2.16.840.1.114027.80.8.1.10'}]
-
name: 'dilithium5'
pretty_name: 'Dilithium5'
Expand All @@ -541,18 +501,6 @@ sigs:
'pretty_name': 'ECDSA p521',
'oid': '1.3.9999.2.7.4',
'code_point': '0xfea6'}]
composite: [{'name': 'p384',
'pretty_name': 'ECDSA p384',
'security': '192',
'oid': '2.16.840.1.114027.80.8.1.11'},
{'name': 'bp384',
'pretty_name': 'ECDSA brainpoolP384r1',
'security': '384',
'oid': '2.16.840.1.114027.80.8.1.12'},
{'name': 'ed448',
'pretty_name': 'ED448',
'security': '192',
'oid': '2.16.840.1.114027.80.8.1.13'}]
-
name: 'dilithium2_aes'
pretty_name: 'Dilithium2_AES'
Expand Down
28 changes: 0 additions & 28 deletions oqsprov/oqs_decode_der2key.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,38 +696,10 @@ MAKE_DECODER(, "p256_dilithium2", p256_dilithium2, oqsx, SubjectPublicKeyInfo);
MAKE_DECODER(, "rsa3072_dilithium2", rsa3072_dilithium2, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "rsa3072_dilithium2", rsa3072_dilithium2, oqsx,
SubjectPublicKeyInfo);
MAKE_DECODER(, "dilithium2_pss2048", dilithium2_pss2048, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "dilithium2_pss2048", dilithium2_pss2048, oqsx,
SubjectPublicKeyInfo);
MAKE_DECODER(, "dilithium2_rsa2048", dilithium2_rsa2048, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "dilithium2_rsa2048", dilithium2_rsa2048, oqsx,
SubjectPublicKeyInfo);
MAKE_DECODER(, "dilithium2_ed25519", dilithium2_ed25519, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "dilithium2_ed25519", dilithium2_ed25519, oqsx,
SubjectPublicKeyInfo);
MAKE_DECODER(, "dilithium2_p256", dilithium2_p256, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "dilithium2_p256", dilithium2_p256, oqsx, SubjectPublicKeyInfo);
MAKE_DECODER(, "dilithium2_bp256", dilithium2_bp256, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "dilithium2_bp256", dilithium2_bp256, oqsx,
SubjectPublicKeyInfo);
MAKE_DECODER(, "dilithium3", dilithium3, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "dilithium3", dilithium3, oqsx, SubjectPublicKeyInfo);
MAKE_DECODER(, "p384_dilithium3", p384_dilithium3, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "p384_dilithium3", p384_dilithium3, oqsx, SubjectPublicKeyInfo);
MAKE_DECODER(, "dilithium3_pss3072", dilithium3_pss3072, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "dilithium3_pss3072", dilithium3_pss3072, 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(, "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", dilithium5, oqsx, PrivateKeyInfo);
MAKE_DECODER(, "dilithium5", dilithium5, oqsx, SubjectPublicKeyInfo);
MAKE_DECODER(, "p521_dilithium5", p521_dilithium5, oqsx, PrivateKeyInfo);
Expand Down
100 changes: 0 additions & 100 deletions oqsprov/oqs_encode_key2any.c
Original file line number Diff line number Diff line change
Expand Up @@ -1138,42 +1138,12 @@ static int oqsx_pki_priv_to_der(const void *vxkey, unsigned char **pder)
#define rsa3072_dilithium2_evp_type 0
#define rsa3072_dilithium2_input_type "rsa3072_dilithium2"
#define rsa3072_dilithium2_pem_type "rsa3072_dilithium2"
#define dilithium2_pss2048_evp_type 0
#define dilithium2_pss2048_input_type "dilithium2_pss2048"
#define dilithium2_pss2048_pem_type "dilithium2_pss2048"
#define dilithium2_rsa2048_evp_type 0
#define dilithium2_rsa2048_input_type "dilithium2_rsa2048"
#define dilithium2_rsa2048_pem_type "dilithium2_rsa2048"
#define dilithium2_ed25519_evp_type 0
#define dilithium2_ed25519_input_type "dilithium2_ed25519"
#define dilithium2_ed25519_pem_type "dilithium2_ed25519"
#define dilithium2_p256_evp_type 0
#define dilithium2_p256_input_type "dilithium2_p256"
#define dilithium2_p256_pem_type "dilithium2_p256"
#define dilithium2_bp256_evp_type 0
#define dilithium2_bp256_input_type "dilithium2_bp256"
#define dilithium2_bp256_pem_type "dilithium2_bp256"
#define dilithium3_evp_type 0
#define dilithium3_input_type "dilithium3"
#define dilithium3_pem_type "dilithium3"
#define p384_dilithium3_evp_type 0
#define p384_dilithium3_input_type "p384_dilithium3"
#define p384_dilithium3_pem_type "p384_dilithium3"
#define dilithium3_pss3072_evp_type 0
#define dilithium3_pss3072_input_type "dilithium3_pss3072"
#define dilithium3_pss3072_pem_type "dilithium3_pss3072"
#define dilithium3_rsa3072_evp_type 0
#define dilithium3_rsa3072_input_type "dilithium3_rsa3072"
#define dilithium3_rsa3072_pem_type "dilithium3_rsa3072"
#define dilithium3_p256_evp_type 0
#define dilithium3_p256_input_type "dilithium3_p256"
#define dilithium3_p256_pem_type "dilithium3_p256"
#define dilithium3_bp256_evp_type 0
#define dilithium3_bp256_input_type "dilithium3_bp256"
#define dilithium3_bp256_pem_type "dilithium3_bp256"
#define dilithium3_ed25519_evp_type 0
#define dilithium3_ed25519_input_type "dilithium3_ed25519"
#define dilithium3_ed25519_pem_type "dilithium3_ed25519"
#define dilithium5_evp_type 0
#define dilithium5_input_type "dilithium5"
#define dilithium5_pem_type "dilithium5"
Expand Down Expand Up @@ -2362,41 +2332,6 @@ MAKE_ENCODER(, rsa3072_dilithium2, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, rsa3072_dilithium2, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, rsa3072_dilithium2, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, rsa3072_dilithium2);
MAKE_ENCODER(, dilithium2_pss2048, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_pss2048, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_pss2048, oqsx, PrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_pss2048, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_pss2048, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, dilithium2_pss2048, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, dilithium2_pss2048);
MAKE_ENCODER(, dilithium2_rsa2048, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_rsa2048, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_rsa2048, oqsx, PrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_rsa2048, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_rsa2048, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, dilithium2_rsa2048, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, dilithium2_rsa2048);
MAKE_ENCODER(, dilithium2_ed25519, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_ed25519, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_ed25519, oqsx, PrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_ed25519, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_ed25519, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, dilithium2_ed25519, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, dilithium2_ed25519);
MAKE_ENCODER(, dilithium2_p256, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_p256, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_p256, oqsx, PrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_p256, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_p256, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, dilithium2_p256, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, dilithium2_p256);
MAKE_ENCODER(, dilithium2_bp256, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_bp256, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_bp256, oqsx, PrivateKeyInfo, der);
MAKE_ENCODER(, dilithium2_bp256, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium2_bp256, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, dilithium2_bp256, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, dilithium2_bp256);
MAKE_ENCODER(, dilithium3, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, dilithium3, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium3, oqsx, PrivateKeyInfo, der);
Expand All @@ -2411,41 +2346,6 @@ MAKE_ENCODER(, p384_dilithium3, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, p384_dilithium3, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, p384_dilithium3, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, p384_dilithium3);
MAKE_ENCODER(, dilithium3_pss3072, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, dilithium3_pss3072, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium3_pss3072, oqsx, PrivateKeyInfo, der);
MAKE_ENCODER(, dilithium3_pss3072, oqsx, PrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium3_pss3072, oqsx, SubjectPublicKeyInfo, der);
MAKE_ENCODER(, dilithium3_pss3072, oqsx, SubjectPublicKeyInfo, pem);
MAKE_TEXT_ENCODER(, dilithium3_pss3072);
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_TEXT_ENCODER(, dilithium3_rsa3072);
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_TEXT_ENCODER(, dilithium3_p256);
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_TEXT_ENCODER(, dilithium3_bp256);
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_TEXT_ENCODER(, dilithium3_ed25519);
MAKE_ENCODER(, dilithium5, oqsx, EncryptedPrivateKeyInfo, der);
MAKE_ENCODER(, dilithium5, oqsx, EncryptedPrivateKeyInfo, pem);
MAKE_ENCODER(, dilithium5, oqsx, PrivateKeyInfo, der);
Expand Down
Loading

0 comments on commit be2ae6a

Please sign in to comment.