masking

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package masking provides the credential masking mechanism.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mask

func Mask(
	conf *internal.Configuration,
	nonceIn, maskingKey, serverPublicKey, envelope []byte,
) (nonce, maskedResponse []byte)

Mask encrypts the serverPublicKey and the envelope under nonceIn and the maskingKey.

func Unmask

func Unmask(
	conf *internal.Configuration,
	randomizedPwd, nonce, maskedResponse []byte,
) (serverPublicKey *group.Element, serverPublicKeyBytes []byte, envelope *keyrecovery.Envelope, err error)

Unmask decrypts the maskedResponse and returns the server's public key and the client key on success. This function assumes that maskedResponse has been checked to be of length pointLength + envelope size.

Types

type Keys

type Keys struct {
	ClientSecretKey                  *group.Scalar
	ClientPublicKey, ServerPublicKey *group.Element
	ExportKey, ServerPublicKeyBytes  []byte
}

Keys contains all the output keys from the masking mechanism.

Jump to

Keyboard shortcuts

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