Cmsex.OID (cmsex v0.1.0)

Copy Markdown View Source

The object identifiers this library knows by name.

Everywhere in the API an OID is a tuple of integers, such as {1, 2, 840, 113549, 1, 7, 1}, and a known one may also be given and is returned as its name, such as :data. Names come only from this fixed table: an OID read from a message that is not in it stays a tuple, so no input can create atoms.

NameOID
:data1.2.840.113549.1.7.1
:signed_data1.2.840.113549.1.7.2
:enveloped_data1.2.840.113549.1.7.3
:digested_data1.2.840.113549.1.7.5
:encrypted_data1.2.840.113549.1.7.6
:auth_data1.2.840.113549.1.9.16.1.2
:tst_info1.2.840.113549.1.9.16.1.4
:content_info1.2.840.113549.1.9.16.1.6
:auth_enveloped_data1.2.840.113549.1.9.16.1.23
:content_type1.2.840.113549.1.9.3
:message_digest1.2.840.113549.1.9.4
:signing_time1.2.840.113549.1.9.5
:countersignature1.2.840.113549.1.9.6
:smime_capabilities1.2.840.113549.1.9.15
:cms_algorithm_protection1.2.840.113549.1.9.52
:content_hint1.2.840.113549.1.9.16.2.4
:signing_certificate1.2.840.113549.1.9.16.2.12
:time_stamp_token1.2.840.113549.1.9.16.2.14
:sig_policy_id1.2.840.113549.1.9.16.2.15
:signing_certificate_v21.2.840.113549.1.9.16.2.47
:md51.2.840.113549.2.5
:sha11.3.14.3.2.26
:sha2242.16.840.1.101.3.4.2.4
:sha2562.16.840.1.101.3.4.2.1
:sha3842.16.840.1.101.3.4.2.2
:sha5122.16.840.1.101.3.4.2.3
:shake1282.16.840.1.101.3.4.2.11
:shake2562.16.840.1.101.3.4.2.12
:shake128_len2.16.840.1.101.3.4.2.17
:shake256_len2.16.840.1.101.3.4.2.18
:rsa_encryption1.2.840.113549.1.1.1
:md5_with_rsa_encryption1.2.840.113549.1.1.4
:sha1_with_rsa_encryption1.2.840.113549.1.1.5
:rsaes_oaep1.2.840.113549.1.1.7
:mgf11.2.840.113549.1.1.8
:p_specified1.2.840.113549.1.1.9
:rsassa_pss1.2.840.113549.1.1.10
:sha256_with_rsa_encryption1.2.840.113549.1.1.11
:sha384_with_rsa_encryption1.2.840.113549.1.1.12
:sha512_with_rsa_encryption1.2.840.113549.1.1.13
:sha224_with_rsa_encryption1.2.840.113549.1.1.14
:ec_public_key1.2.840.10045.2.1
:ecdsa_with_sha11.2.840.10045.4.1
:ecdsa_with_sha2241.2.840.10045.4.3.1
:ecdsa_with_sha2561.2.840.10045.4.3.2
:ecdsa_with_sha3841.2.840.10045.4.3.3
:ecdsa_with_sha5121.2.840.10045.4.3.4
:secp256r11.2.840.10045.3.1.7
:secp384r11.3.132.0.34
:secp521r11.3.132.0.35
:brainpool_p256r11.3.36.3.3.2.8.1.1.7
:brainpool_p384r11.3.36.3.3.2.8.1.1.11
:brainpool_p512r11.3.36.3.3.2.8.1.1.13
:x255191.3.101.110
:x4481.3.101.111
:ed255191.3.101.112
:ed4481.3.101.113
:std_dh_sha1kdf1.3.133.16.840.63.0.2
:cofactor_dh_sha1kdf1.3.133.16.840.63.0.3
:std_dh_sha224kdf1.3.132.1.11.0
:std_dh_sha256kdf1.3.132.1.11.1
:std_dh_sha384kdf1.3.132.1.11.2
:std_dh_sha512kdf1.3.132.1.11.3
:cofactor_dh_sha224kdf1.3.132.1.14.0
:cofactor_dh_sha256kdf1.3.132.1.14.1
:cofactor_dh_sha384kdf1.3.132.1.14.2
:cofactor_dh_sha512kdf1.3.132.1.14.3
:std_dh_hkdf_sha2561.2.840.113549.1.9.16.3.19
:std_dh_hkdf_sha3841.2.840.113549.1.9.16.3.20
:std_dh_hkdf_sha5121.2.840.113549.1.9.16.3.21
:dsa1.2.840.10040.4.1
:dsa_with_sha11.2.840.10040.4.3
:dsa_with_sha2242.16.840.1.101.3.4.3.1
:dsa_with_sha2562.16.840.1.101.3.4.3.2
:dh_public_number1.2.840.10046.2.1
:esdh1.2.840.113549.1.9.16.3.5
:aes128_cbc2.16.840.1.101.3.4.1.2
:aes192_cbc2.16.840.1.101.3.4.1.22
:aes256_cbc2.16.840.1.101.3.4.1.42
:aes128_gcm2.16.840.1.101.3.4.1.6
:aes192_gcm2.16.840.1.101.3.4.1.26
:aes256_gcm2.16.840.1.101.3.4.1.46
:aes128_ccm2.16.840.1.101.3.4.1.7
:aes192_ccm2.16.840.1.101.3.4.1.27
:aes256_ccm2.16.840.1.101.3.4.1.47
:aes128_wrap2.16.840.1.101.3.4.1.5
:aes192_wrap2.16.840.1.101.3.4.1.25
:aes256_wrap2.16.840.1.101.3.4.1.45
:aes128_wrap_pad2.16.840.1.101.3.4.1.8
:aes192_wrap_pad2.16.840.1.101.3.4.1.28
:aes256_wrap_pad2.16.840.1.101.3.4.1.48
:des_ede3_cbc1.2.840.113549.3.7
:rc2_cbc1.2.840.113549.3.2
:des_cbc1.3.14.3.2.7
:cms3des_wrap1.2.840.113549.1.9.16.3.6
:cmsrc2_wrap1.2.840.113549.1.9.16.3.7
:chacha20_poly13051.2.840.113549.1.9.16.3.18
:pwri_kek1.2.840.113549.1.9.16.3.9
:pbkdf21.2.840.113549.1.5.12
:hmac_sha11.3.6.1.5.5.8.1.2
:hmac_with_sha11.2.840.113549.2.7
:hmac_sha2241.2.840.113549.2.8
:hmac_sha2561.2.840.113549.2.9
:hmac_sha3841.2.840.113549.2.10
:hmac_sha5121.2.840.113549.2.11
:subject_key_identifier2.5.29.14
:key_usage2.5.29.15
:basic_constraints2.5.29.19
:authority_key_identifier2.5.29.35
:ext_key_usage2.5.29.37
:kp_time_stamping1.3.6.1.5.5.7.3.8

Summary

Functions

The dotted form of an OID or of a name.

The name of an OID, or the OID itself when it has none.

The OID of a name, or the OID itself.

Types

name()

@type name() :: atom()

t()

@type t() :: tuple()

Functions

dotted(oid)

@spec dotted(name() | t()) :: String.t()

The dotted form of an OID or of a name.

iex> Cmsex.OID.dotted(:sha256)
"2.16.840.1.101.3.4.2.1"

name(oid)

@spec name(t()) :: name() | t()

The name of an OID, or the OID itself when it has none.

iex> Cmsex.OID.name({1, 2, 840, 113549, 1, 7, 2})
:signed_data
iex> Cmsex.OID.name({1, 2, 3})
{1, 2, 3}

oid(oid)

@spec oid(name() | t()) :: t()

The OID of a name, or the OID itself.

iex> Cmsex.OID.oid(:data)
{1, 2, 840, 113549, 1, 7, 1}
iex> Cmsex.OID.oid({1, 2, 3})
{1, 2, 3}