# Packages
No description provided by the author
# Functions
AEStoEncryptedPEM encapsulates an AES key in the encrypted PEM format.
AEStoPEM encapsulates an AES key in the PEM format.
CBCDecrypt decrypts using CBC mode.
CBCEncrypt encrypts using CBC mode.
CBCPKCS7Decrypt combines CBC decryption and PKCS7 unpadding.
CBCPKCS7Encrypt combines CBC encryption and PKCS7 padding.
CheckCertAgainRoot check the validity of the passed certificate against the passed certPool.
CheckCertAgainstSKAndRoot checks the passed certificate against the passed secretkey and certPool.
CheckCertPKAgainstSK checks certificate's publickey against the passed secret key.
DERCertToPEM converts der to pem.
DERToPrivateKey unmarshals a der to private key.
DERToPublicKey unmarshals a der to public key.
DERToX509Certificate converts der to x509.
ECDSASign signs.
ECDSASignDirect signs.
ECDSAVerify verifies.
GenAESKey returns a random AES key of length AESKeyLength.
GetCriticalExtension returns a requested critical extension.
GetDefaultCurve returns the default elliptic curve used by the crypto layer.
GetDefaultHash returns the default hash function used by the crypto layer.
GetHashAlgorithm return the default hash algorithm.
GetRandomBytes returns len random looking bytes.
GetRandomNonce returns a random byte array of length NonceSize.
Hash hashes the msh using the predefined hash function.
HMAC hmacs x using key key.
HMACAESTruncated hmacs x using key key and truncate to AESKeyLength.
HMACTruncated hmacs x using key key and truncate to truncation.
InitSecurityLevel initialize the crypto layer at the given security level.
NewECDSAKey generates a new ECDSA Key.
NewHash returns a new hash function.
NewSelfSignedCert create a self signed certificate.
PEMtoAES extracts from the PEM an AES key.
PEMtoCertificate converts pem to x509.
PEMtoCertificateAndDER converts pem to x509 and der.
PEMtoDER converts pem to der.
PEMtoPrivateKey unmarshals a pem to private key.
PEMtoPublicKey unmarshals a pem to public key.
PKCS7Padding pads as prescribed by the PKCS7 standard.
PKCS7UnPadding unpads as prescribed by the PKCS7 standard.
PrivateKeyToDER marshals a private key to der.
PrivateKeyToEncryptedPEM converts a private key to an encrypted PEM.
PrivateKeyToPEM converts a private key to PEM.
PublicKeyToEncryptedPEM converts a public key to encrypted pem.
PublicKeyToPEM marshals a public key to the pem forma.
SetSecurityLevel sets the security configuration with the hash length and the algorithm.
VerifySignCapability tests signing capabilities.
# Constants
AESKeyLength is the default AES key length.
NonceSize is the default NonceSize.
# Variables
ErrDecryption Error during decryption.
ErrEncryption Error during encryption.
ErrInvalidKeyGeneratorParameter Invalid Key Generator Parameter.
ErrInvalidKeyParameter Invalid Key Parameter.
ErrInvalidNilKeyParameter Invalid Nil Key Parameter.
ErrInvalidPublicKeyType Invalid Public Key type.
ErrInvalidSecretKeyType Invalid Secret Key type.
TCertAttributesHeaders is the ASN1 object identifier of attributes header.
TCertEncAttributesBase is the base ASN1 object identifier for attributes.
TCertEncEnrollmentID is the ASN1 object identifier of the TCert index.
TCertEncTCertIndex oid for TCertIndex.
# Structs
ECDSASignature represents an ECDSA signature.
# Interfaces
AsymmetricCipher defines an asymmetric cipher.
AsymmetricCipherParameters is common interface to represent asymmetric cipher parameters.
AsymmetricCipherSPI is a Service Provider Interface for AsymmetricCipher.
CipherParameters is common interface to represent cipher parameters.
KeyGenerator defines a key generator.
KeyGeneratorParameters is common interface to represent key generation parameters.
KeySerializer defines a key serializer/deserializer.
Parameters is common interface for all the parameters.
PrivateKey is common interface to represent private asymmetric cipher parameters.
PublicKey is common interface to represent public asymmetric cipher parameters.
SecretKey defines a symmetric key.
StreamCipher defines a stream cipher.
StreamCipherSPI is a Service Provider Interface for StreamCipher.