1
0
mirror of https://github.com/opencryptoki/opencryptoki.git synced 2026-10-24 05:39:17 +03:00
Files
opencryptoki/usr/include/pqc_oids.h
Ingo Franzki bb8733875f COMMON: Fix typo in ML-KEM OID define and constant
External define OCK_ML_KEM_786 has a typo, it must be OCK_ML_KEM_768. Fix
this, but keep the old define for backward compatibility.

Also constant ml_kem_786 has the same typo, it must be ml_kem_768. Fix
this also (not externally visible).

Fixes: 1440e408f8

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
2026-04-22 13:07:57 +02:00

74 lines
3.3 KiB
C

/*
* COPYRIGHT (c) International Business Machines Corp. 2022
*
* This program is provided under the terms of the Common Public License,
* version 1.0 (CPL-1.0). Any use, reproduction or distribution for this
* software constitutes recipient's acceptance of CPL-1.0 terms which can be
* found in the file LICENSE file or at
* https://opensource.org/licenses/cpl1.0.php
*/
#ifndef _PQC_OIDS_H_
#define _PQC_OIDS_H_
/*
* OIDs and their DER encoding for the post-quantum crypto algorithms
* supported by OpenCryptoki:
*/
/* Dilithium Round 2 high-security (SHAKE-256): 1.3.6.1.4.1.2.267.1.6.5 */
#define OCK_DILITHIUM_R2_65 { 0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, \
0x01, 0x02, 0x82, 0x0B, 0x01, 0x06, 0x05 }
/* Dilithium Round 2 for outbound authentication: 1.3.6.1.4.1.2.267.1.8.7 */
#define OCK_DILITHIUM_R2_87 { 0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, \
0x01, 0x02, 0x82, 0x0B, 0x01, 0x08, 0x07 }
/* Dilithium Round 3 weak (SHAKE-256): 1.3.6.1.4.1.2.267.7.4.4 */
#define OCK_DILITHIUM_R3_44 { 0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, \
0x01, 0x02, 0x82, 0x0B, 0x07, 0x04, 0x04 }
/* Dilithium Round 3 recommended (SHAKE-256): 1.3.6.1.4.1.2.267.7.6.5 */
#define OCK_DILITHIUM_R3_65 { 0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, \
0x01, 0x02, 0x82, 0x0B, 0x07, 0x06, 0x05 }
/* Dilithium Round 3 high-security (SHAKE-256): 1.3.6.1.4.1.2.267.7.8.7 */
#define OCK_DILITHIUM_R3_87 { 0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, \
0x01, 0x02, 0x82, 0x0B, 0x07, 0x08, 0x07 }
/* Kyber Round 2 768 (SHAKE-128): 1.3.6.1.4.1.2.267.5.3.3 */
#define OCK_KYBER_R2_768 { 0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, \
0x01, 0x02, 0x82, 0x0B, 0x05, 0x03, 0x03 }
/* Kyber Round 2 1024 (SHAKE-128): 1.3.6.1.4.1.2.267.5.4.4 */
#define OCK_KYBER_R2_1024 { 0x06, 0x0B, 0x2B, 0x06, 0x01, 0x04, \
0x01, 0x02, 0x82, 0x0B, 0x05, 0x04, 0x04 }
/* ML-DSA 44: 2.16.840.1.101.3.4.3.17 */
#define OCK_ML_DSA_44 { 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, \
0x65, 0x03, 0x04, 0x03, 0x11 }
/* ML-DSA 65: 2.16.840.1.101.3.4.3.18 */
#define OCK_ML_DSA_65 { 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, \
0x65, 0x03, 0x04, 0x03, 0x12 }
/* ML-DSA 87: 2.16.840.1.101.3.4.3.19 */
#define OCK_ML_DSA_87 { 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, \
0x65, 0x03, 0x04, 0x03, 0x13 }
/* ML-KEM 512: 2.16.840.1.101.3.4.4.1 */
#define OCK_ML_KEM_512 { 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, \
0x65, 0x03, 0x04, 0x04, 0x01 }
/* ML-KEM 768: 2.16.840.1.101.3.4.4.2 */
#define OCK_ML_KEM_768 { 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, \
0x65, 0x03, 0x04, 0x04, 0x02 }
#define OCK_ML_KEM_786 OCK_ML_KEM_768 /* backward compatibility */
/* ML-KEM 1024: 2.16.840.1.101.3.4.4.3 */
#define OCK_ML_KEM_1024 { 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, \
0x65, 0x03, 0x04, 0x04, 0x03 }
#endif // _PQC_OIDS_H_