aai

package
v0.0.0-...-1b2fa07 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AAI

type AAI interface {
	Signcrypt(sender *signcryption.Certificate, recipient *signcryption.Certificate,
		plaintext, additionalData []byte) (*SigncryptionOutput, error)
	Verify(sender, recipient *signcryption.Certificate,
		additionalData []byte, output *SigncryptionOutput) (bool, error)
	Unsigncrypt(sender, recipient *signcryption.Certificate,
		additionalData []byte, output *SigncryptionOutput) ([]byte, bool, error)
}

AAI represents all of the different functions possible with the AAI signcryption scheme.

func NewP256

func NewP256() AAI

NewP256 returns an AAI instance based on the elliptic curve P256. The instance uses AES-CTR-128 for encrypting and SHA-256 for generating keys. This signcryption scheme provides security at the 128-bit level.

func NewP521

func NewP521() AAI

NewP521 returns an AAI instance based on the elliptic curve P521. The signcrypter uses AES-CTR-512 for encrypting and SHA-512 for generating keys. This signcryption scheme provides security at the 256-bit level.

type SigncryptionOutput

type SigncryptionOutput struct {
	R          []byte
	Ciphertext []byte
	Signature  []byte
}

SigncryptionOutput is the output generated by the signcryption process. All of it must be maintained in order to verify and unsigncrypt the data.

Jump to

Keyboard shortcuts

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