cms

package module
v0.0.0-...-76a243e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2015 License: MIT Imports: 4 Imported by: 0

README

cms

Cryptographic Message Syntax

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttCertVersionV1

type AttCertVersionV1 int

AttCertVersionV1 ::= INTEGER { v1(0) }

type Attribute

type Attribute struct {
	AttrType   asn1.ObjectIdentifier
	AttrValues []AttributeValue `asn1:"set"`
}
Attribute ::= SEQUENCE {
  attrType OBJECT IDENTIFIER,
  attrValues SET OF AttributeValue }

type AttributeValue

type AttributeValue interface{}

AttributeValue ::= ANY

type AuthAttributesSET

type AuthAttributesSET []Attribute

AuthAttributesSET ::= SET SIZE (1..MAX) OF Attribute

type AuthenticatedData

type AuthenticatedData struct {
	Version          CMSVersion
	OriginatorInfo   OriginatorInfo `asn1:"tag:0,implicit,optional"`
	RecipientInfos   []asn1.RawValue
	MACAlgorithm     pkix.AlgorithmIdentifier
	DigestAlgorithm  pkix.AlgorithmIdentifier `asn1:"tag:1,explicit,optional"`
	EncapContentInfo EncapsulatedContentInfo
	AuthAttrs        AuthAttributesSET `asn1:"tag:2,implicit,optional"`
	MAC              MessageAuthenticationCode
	UnauthAttrs      UnauthAttributesSET `asn1:"tag:3,implicit,optional"`
}
AuthenticatedData ::= SEQUENCE {
  version CMSVersion,
  originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
  recipientInfos RecipientInfos,
  macAlgorithm MessageAuthenticationCodeAlgorithm,
  digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
  encapContentInfo EncapsulatedContentInfo,
  authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
  mac MessageAuthenticationCode,
  unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }

type CMSVersion

type CMSVersion int

CMSVersion ::= INTEGER { v0(0), v1(1), v2(2), v3(3), v4(4), v5(5) }

type ContentInfo

type ContentInfo struct {
	ContentType asn1.ObjectIdentifier
	Content     interface{} `asn1:"tag:0,explicit"`
}
ContentInfo ::= SEQUENCE {
  contentType ContentType,
  content [0] EXPLICIT ANY DEFINED BY contentType }

ContentType ::= OBJECT IDENTIFIER

type Digest

type Digest []byte

Digest ::= OCTET STRING

type DigestAlgorithmIdentifiersSET

type DigestAlgorithmIdentifiersSET []pkix.AlgorithmIdentifier

DigestAlgorithmIdentifiersSET ::= SET OF DigestAlgorithmIdentifier

type DigestedData

type DigestedData struct {
	Version          CMSVersion
	DigestAlgorithm  pkix.AlgorithmIdentifier
	EncapContentInfo EncapsulatedContentInfo
	Digest           Digest
}
DigestedData ::= SEQUENCE {
  version CMSVersion,
  digestAlgorithm DigestAlgorithmIdentifier,
  encapContentInfo EncapsulatedContentInfo,
  digest Digest }

type EncapsulatedContentInfo

type EncapsulatedContentInfo struct {
	EContentType asn1.ObjectIdentifier
	EContent     []byte `asn1:"tag:0,explicit,optional,omitempty"`
}
EncapsulatedContentInfo ::= SEQUENCE {
  eContentType ContentType,
  eContent [0] EXPLICIT OCTET STRING OPTIONAL }

type EncryptedContent

type EncryptedContent []byte

EncryptedContent ::= OCTET STRING

type EncryptedContentInfo

type EncryptedContentInfo struct {
	ContentType                asn1.ObjectIdentifier
	ContentEncryptionAlgorithm pkix.AlgorithmIdentifier
	EncryptedContent           EncryptedContent `asn1:"implicit,tag:0,optional"`
}
EncryptedContentInfo ::= SEQUENCE {
  contentType ContentType,
  contentEncryptionAlgorithm ContentEncryptionAlgorithmIdentifier,
  encryptedContent [0] IMPLICIT EncryptedContent OPTIONAL }

type EncryptedData

type EncryptedData struct {
	Version              CMSVersion
	EncryptedContentInfo EncapsulatedContentInfo
	UnprotectedAttrs     UnprotectedAttributesSET `asn1:"implicit,tag:1,optional"`
}
EncryptedData ::= SEQUENCE {
  version CMSVersion,
  encryptedContentInfo EncryptedContentInfo,
  unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }

type EncryptedKey

type EncryptedKey []byte

EncryptedKey ::= OCTET STRING

type EnvelopedData

type EnvelopedData struct {
	Version              CMSVersion
	OriginatorInfo       OriginatorInfo `asn1:"tag:0,implicit,optional"`
	RecipientInfos       []asn1.RawValue
	EncryptedContentInfo EncryptedContentInfo
	UnprotectedAttrs     UnprotectedAttributesSET `asn1:"tag:1,implicit,optional"`
}
EnvelopedData ::= SEQUENCE {
  version CMSVersion,
  originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
  recipientInfos RecipientInfos,
  encryptedContentInfo EncryptedContentInfo,
  unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL }

type IssuerAndSerialNumber

type IssuerAndSerialNumber struct {
	Issuer       pkix.RDNSequence
	SerialNumber *big.Int
}
IssuerAndSerialNumber ::= SEQUENCE {
   issuer Name,
   serialNumber CertificateSerialNumber }

type KEKIdentifier

type KEKIdentifier struct {
	KeyIdentifier []byte
	Date          time.Time         `asn1:"optional"`
	Other         OtherKeyAttribute `asn1:"optional"`
}
KEKIdentifier ::= SEQUENCE {
  keyIdentifier OCTET STRING,
  date GeneralizedTime OPTIONAL,
  other OtherKeyAttribute OPTIONAL }

type KEKRecipientInfo

type KEKRecipientInfo struct {
	Version                CMSVersion
	Kekid                  KEKIdentifier
	KeyEncryptionAlgorithm pkix.AlgorithmIdentifier
	EncryptedKey           EncryptedKey
}
KEKRecipientInfo ::= SEQUENCE {
  version CMSVersion,  -- always set to 4
  kekid KEKIdentifier,
  keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
  encryptedKey EncryptedKey }

type KeyAgreeRecipientInfo

type KeyAgreeRecipientInfo struct {
	Version                CMSVersion
	Originator             interface{}        `asn1:"explicit,tag:0"`
	Ukm                    UserKeyingMaterial `asn1:"explicit,tag:1,optional"`
	KeyEncryptionAlgorithm pkix.AlgorithmIdentifier
	RecipientEncryptedKeys RecipientEncryptedKeys
}
KeyAgreeRecipientInfo ::= SEQUENCE {
  version CMSVersion,  -- always set to 3
  originator ::= CHOICE {
    issuerAndSerialNumber IssuerAndSerialNumber,
    subjectKeyIdentifier [0] SubjectKeyIdentifier,
    originatorKey [1] OriginatorPublicKey } [0] EXPLICIT OriginatorIdentifierOrKey,
  ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
  keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
  recipientEncryptedKeys RecipientEncryptedKeys }

type KeyTransRecipientInfo

type KeyTransRecipientInfo struct {
	Version                CMSVersion
	IssuerAndSerialNumber  IssuerAndSerialNumber `asn1:"optional"`
	SubjectKeyIdentifier   SubjectKeyIdentifier  `asn1:"tag:0,optional"`
	KeyEncryptionAlgorithm pkix.AlgorithmIdentifier
	EncryptedKey           EncryptedKey
}
KeyTransRecipientInfo ::= SEQUENCE {
  version CMSVersion,  -- always set to 0 or 2
  rid RecipientIdentifier ::= CHOICE {
    issuerAndSerialNumber IssuerAndSerialNumber,
    subjectKeyIdentifier [0] SubjectKeyIdentifier }
  keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
  encryptedKey EncryptedKey }

type MessageAuthenticationCode

type MessageAuthenticationCode []byte

MessageAuthenticationCode ::= OCTET STRING

type MessageDigest

type MessageDigest []byte

MessageDigest ::= OCTET STRING

type OriginatorInfo

type OriginatorInfo struct {
	Certs []asn1.RawValue `asn1:"tag:0,implicit,optional"`
	Crls  []asn1.RawValue `asn1:"tag:1,implicit,optional"`
}
OriginatorInfo ::= SEQUENCE {
  certs [0] IMPLICIT CertificateSet OPTIONAL,
  crls [1] IMPLICIT RevocationInfoChoices OPTIONAL }

type OriginatorPublicKey

type OriginatorPublicKey struct {
	Algorithm pkix.AlgorithmIdentifier
	PublicKey asn1.BitString
}
OriginatorPublicKey ::= SEQUENCE {
  algorithm AlgorithmIdentifier,
  publicKey BIT STRING }

type OtherCertificateFormat

type OtherCertificateFormat struct {
	OtherCertFormat asn1.ObjectIdentifier
	OtherCert       interface{}
}
OtherCertificateFormat ::= SEQUENCE {
   otherCertFormat OBJECT IDENTIFIER,
   otherCert ANY DEFINED BY otherCertFormat }

type OtherKeyAttribute

type OtherKeyAttribute struct {
	KeyAttrID asn1.ObjectIdentifier
	KeyAttr   asn1.RawValue `asn1:"optional"`
}
OtherKeyAttribute ::= SEQUENCE {
  keyAttrId OBJECT IDENTIFIER,
  keyAttr ANY DEFINED BY keyAttrId OPTIONAL }

type OtherRecipientInfo

type OtherRecipientInfo struct {
	OriType  asn1.ObjectIdentifier
	OriValue interface{}
}
OtherRecipientInfo ::= SEQUENCE {
  oriType OBJECT IDENTIFIER,
  oriValue ANY DEFINED BY oriType }

type OtherRevocationInfoFormat

type OtherRevocationInfoFormat struct {
	OtherRevInfoFormat asn1.ObjectIdentifier
	OtherRevInfo       interface{}
}
OtherRevocationInfoFormat ::= SEQUENCE {
  otherRevInfoFormat OBJECT IDENTIFIER,
  otherRevInfo ANY DEFINED BY otherRevInfoFormat }

type PasswordRecipientInfo

type PasswordRecipientInfo struct {
	Version                CMSVersion
	KeyDerivationAlgorithm pkix.AlgorithmIdentifier `asn1:"implicit,tag:0,optional"`
	KeyEncryptionAlgorithm pkix.AlgorithmIdentifier
	EncryptedKey           EncryptedKey
}
PasswordRecipientInfo ::= SEQUENCE {
  version CMSVersion,   -- always set to 0
  keyDerivationAlgorithm [0] KeyDerivationAlgorithmIdentifier
                             OPTIONAL,
  keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
  encryptedKey EncryptedKey }

type RecipientEncryptedKey

type RecipientEncryptedKey struct {
	IssuerAndSerialNumber IssuerAndSerialNumber  `asn1:"optional"`
	RKeyID                RecipientKeyIdentifier `asn1:"implicit,tag:0,optional"`
	EncryptedKey          EncryptedKey
}
RecipientEncryptedKey ::= SEQUENCE {
  rid ::= CHOICE {
    issuerAndSerialNumber IssuerAndSerialNumber,
    rKeyId [0] IMPLICIT RecipientKeyIdentifier }
  encryptedKey EncryptedKey }

type RecipientEncryptedKeys

type RecipientEncryptedKeys []RecipientEncryptedKey

RecipientEncryptedKeys ::= SEQUENCE OF RecipientEncryptedKey

type RecipientKeyIdentifier

type RecipientKeyIdentifier struct {
	SubjectKeyIdentifier SubjectKeyIdentifier
	Date                 time.Time
	Other                OtherKeyAttribute `asn1:"optional"`
}
RecipientKeyIdentifier ::= SEQUENCE {
  subjectKeyIdentifier SubjectKeyIdentifier,
  date GeneralizedTime OPTIONAL,
  other OtherKeyAttribute OPTIONAL }

type SignatureValue

type SignatureValue []byte

SignatureValue ::= OCTET STRING

type SignedAttributesSET

type SignedAttributesSET []Attribute

SignedAttributesSET ::= SET SIZE (1..MAX) OF Attribute

type SignedData

type SignedData struct {
	Version          CMSVersion
	DigestAlgorithms DigestAlgorithmIdentifiersSET
	EncapContentInfo EncapsulatedContentInfo
	Certificates     []asn1.RawValue `asn1:"implicit,tag:0,optional"`
	Crls             []asn1.RawValue `asn1:"implicit,tag:1,optional"`
	SignerInfos      SignerInfosSET
}
SignedData ::= SEQUENCE {
  version CMSVersion,
  digestAlgorithms DigestAlgorithmIdentifiers,
  encapContentInfo EncapsulatedContentInfo,
  certificates [0] IMPLICIT CertificateSet OPTIONAL,
  crls [1] IMPLICIT RevocationInfoChoices OPTIONAL,
  signerInfos SignerInfos }

type SignerInfo

type SignerInfo struct {
	Version                   CMSVersion
	IssuerAndSerialNumber     IssuerAndSerialNumber `asn1:"optional"`
	SubjectKeyIdentifier      SubjectKeyIdentifier  `asn1:"tag:0,implicit,optional"`
	DigestAlgorithmIdentifier pkix.AlgorithmIdentifier
	SignedAttrs               SignedAttributesSET `asn1:"tag:0,implicit,optional"`
	SignatureAlgorithm        pkix.AlgorithmIdentifier
	Signature                 SignatureValue
	UnsignedAttributes        UnsignedAttributesSET `asn1:"tag:1,implicit,optional"`
}
SignerInfo ::= SEQUENCE {
  version CMSVersion,
  sid SignerIdentifier ::= CHOICE {
    issuerAndSerialNumber IssuerAndSerialNumber,
    subjectKeyIdentifier [0] SubjectKeyIdentifier }
  digestAlgorithm DigestAlgorithmIdentifier,
  signedAttrs [0] IMPLICIT SignedAttributes OPTIONAL,
  signatureAlgorithm SignatureAlgorithmIdentifier,
  signature SignatureValue,
  unsignedAttrs [1] IMPLICIT UnsignedAttributes OPTIONAL }

type SignerInfosSET

type SignerInfosSET []SignerInfo

SignerInfosSET ::= SET OF SignerInfo

type SubjectKeyIdentifier

type SubjectKeyIdentifier []byte

SubjectKeyIdentifier ::= OCTET STRING

type UnauthAttributesSET

type UnauthAttributesSET []Attribute

UnauthAttributesSET ::= SET SIZE (1..MAX) OF Attribute

type UnprotectedAttributesSET

type UnprotectedAttributesSET []Attribute

UnprotectedAttributesSET ::= SET SIZE (1..MAX) OF Attribute

type UnsignedAttributesSET

type UnsignedAttributesSET []Attribute

UnsignedAttributesSET ::= SET SIZE (1..MAX) OF Attribute

type UserKeyingMaterial

type UserKeyingMaterial []byte

UserKeyingMaterial ::= OCTET STRING

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL