ms-pkca 0.1.0-dev

PKINIT (RFC 4556) client โ€” PA-PK-AS-REQ / PA-PK-AS-REP with X.509 cert + UnPAC-the-hash (pre-alpha)
Documentation
//! OIDs used by PKINIT (RFC 4556) and CMS.
//!
//! We hand-declare only the ones we need; `const_oid::db` covers many but keeping
//! them local keeps the surface auditable.

use const_oid::ObjectIdentifier;

// --- PKINIT (RFC 4556 ยง5) ---------------------------------------------------

/// id-pkinit-authData  1.3.6.1.5.2.3.1
pub const PKINIT_AUTH_DATA: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.6.1.5.2.3.1");

/// id-pkinit-DHKeyData  1.3.6.1.5.2.3.2
pub const PKINIT_DH_KEY_DATA: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.6.1.5.2.3.2");

/// id-pkinit-rkeyData  1.3.6.1.5.2.3.3 (RSA key-transport variant)
pub const PKINIT_RKEY_DATA: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.6.1.5.2.3.3");

/// id-pkinit-KPClientAuth  1.3.6.1.5.2.3.4
pub const PKINIT_KP_CLIENT_AUTH: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.6.1.5.2.3.4");

/// id-ms-kp-sc-logon  1.3.6.1.4.1.311.20.2.2  (Microsoft smart-card logon EKU)
pub const MS_KP_SC_LOGON: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.6.1.4.1.311.20.2.2");

/// id-pkinit-san  1.3.6.1.5.2.2 โ€” SAN OtherName for KRB5PrincipalName
pub const PKINIT_SAN: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.6.1.5.2.2");

/// Microsoft UPN OtherName  1.3.6.1.4.1.311.20.2.3
pub const MS_UPN: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.6.1.4.1.311.20.2.3");

// --- CMS / PKCS#7 -----------------------------------------------------------

/// id-signedData  1.2.840.113549.1.7.2
pub const CMS_SIGNED_DATA: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113549.1.7.2");

/// id-envelopedData  1.2.840.113549.1.7.3
pub const CMS_ENVELOPED_DATA: ObjectIdentifier =
    ObjectIdentifier::new_unwrap("1.2.840.113549.1.7.3");

/// id-data  1.2.840.113549.1.7.1
pub const CMS_DATA: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113549.1.7.1");

/// id-contentType  1.2.840.113549.1.9.3
pub const CMS_ATTR_CONTENT_TYPE: ObjectIdentifier =
    ObjectIdentifier::new_unwrap("1.2.840.113549.1.9.3");

/// id-messageDigest  1.2.840.113549.1.9.4
pub const CMS_ATTR_MESSAGE_DIGEST: ObjectIdentifier =
    ObjectIdentifier::new_unwrap("1.2.840.113549.1.9.4");

// --- Signature algorithms ---------------------------------------------------

/// sha256WithRSAEncryption  1.2.840.113549.1.1.11
pub const SHA256_WITH_RSA: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113549.1.1.11");

/// rsaEncryption  1.2.840.113549.1.1.1
pub const RSA_ENCRYPTION: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.113549.1.1.1");

/// id-sha256  2.16.840.1.101.3.4.2.1
pub const SHA256: ObjectIdentifier = ObjectIdentifier::new_unwrap("2.16.840.1.101.3.4.2.1");

/// id-sha1  1.3.14.3.2.26
pub const SHA1: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.3.14.3.2.26");

/// dhpublicnumber  1.2.840.10046.2.1
pub const DH_PUBLIC_NUMBER: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.840.10046.2.1");

// --- CMS content-encryption algorithms (NIST OIDs, arc 2.16.840.1.101.3.4.1) ---

/// aes128-CBC  2.16.840.1.101.3.4.1.2
pub const AES128_CBC: ObjectIdentifier = ObjectIdentifier::new_unwrap("2.16.840.1.101.3.4.1.2");

/// aes192-CBC  2.16.840.1.101.3.4.1.22
pub const AES192_CBC: ObjectIdentifier = ObjectIdentifier::new_unwrap("2.16.840.1.101.3.4.1.22");

/// aes256-CBC  2.16.840.1.101.3.4.1.42
pub const AES256_CBC: ObjectIdentifier = ObjectIdentifier::new_unwrap("2.16.840.1.101.3.4.1.42");