Class OpaqueUtil (6.119.0)

public class OpaqueUtil

Inheritance

java.lang.Object > OpaqueUtil

Static Fields

AUTH_KEY_INFO

public static final String AUTH_KEY_INFO
Field Value
Type Description
String

CURVE_NAME

public static final String CURVE_NAME
Field Value
Type Description
String

DIFFIE_HELLMAN_KEY_INFO

public static final String DIFFIE_HELLMAN_KEY_INFO
Field Value
Type Description
String

EXPORT_KEY_INFO

public static final String EXPORT_KEY_INFO
Field Value
Type Description
String

HMAC_SHA256

public static final String HMAC_SHA256
Field Value
Type Description
String

LOGIN_DOMAIN_SEPARATION_TAG

public static final String LOGIN_DOMAIN_SEPARATION_TAG
Field Value
Type Description
String

MASKING_KEY_INFO

public static final String MASKING_KEY_INFO
Field Value
Type Description
String

PRIVATE_KEY_INFO

public static final String PRIVATE_KEY_INFO
Field Value
Type Description
String

Static Methods

blind(byte[] password, byte[] blindScalar)

public static byte[] blind(byte[] password, byte[] blindScalar)
Parameters
Name Description
password byte[]
blindScalar byte[]
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

concat(byte[][] arrays)

public static byte[] concat(byte[][] arrays)
Parameter
Name Description
arrays byte[][]
Returns
Type Description
byte[]

diffieHellman(byte[] privateKey, byte[] peerPublicKey)

public static byte[] diffieHellman(byte[] privateKey, byte[] peerPublicKey)
Parameters
Name Description
privateKey byte[]
peerPublicKey byte[]
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

expand(byte[] keyMaterial, byte[] info, int size)

public static byte[] expand(byte[] keyMaterial, byte[] info, int size)
Parameters
Name Description
keyMaterial byte[]
info byte[]
size int
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

extract(byte[] inputKeyMaterial)

public static byte[] extract(byte[] inputKeyMaterial)
Parameter
Name Description
inputKeyMaterial byte[]
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

finalize(byte[] blind, byte[] evaluatedMessage)

public static byte[] finalize(byte[] blind, byte[] evaluatedMessage)
Parameters
Name Description
blind byte[]
evaluatedMessage byte[]
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

generateKeyPair(byte[] deriveInput)

public static byte[][] generateKeyPair(byte[] deriveInput)
Parameter
Name Description
deriveInput byte[]
Returns
Type Description
byte[][]
Exceptions
Type Description
GeneralSecurityException

getHashToCurve(byte[] message, byte[] domain)

public static byte[] getHashToCurve(byte[] message, byte[] domain)
Parameters
Name Description
message byte[]
domain byte[]
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

hmacSha256(byte[] key, byte[] message)

public static byte[] hmacSha256(byte[] key, byte[] message)
Parameters
Name Description
key byte[]
message byte[]
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

mac(byte[] key, byte[] data)

public static byte[] mac(byte[] key, byte[] data)
Parameters
Name Description
key byte[]
data byte[]
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

nonce()

public static byte[] nonce()
Returns
Type Description
byte[]

randomOracleSha256(byte[] x, BigInteger max)

public static byte[] randomOracleSha256(byte[] x, BigInteger max)
Parameters
Name Description
x byte[]
max BigInteger
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

sha256(byte[] message)

public static byte[] sha256(byte[] message)
Parameter
Name Description
message byte[]
Returns
Type Description
byte[]
Exceptions
Type Description
NoSuchAlgorithmException

stretch(byte[] input, Authentication.HashParameters hashParameters)

public static byte[] stretch(byte[] input, Authentication.HashParameters hashParameters)
Parameters
Name Description
input byte[]
hashParameters com.google.cloud.spanner.omni.Authentication.HashParameters
Returns
Type Description
byte[]
Exceptions
Type Description
GeneralSecurityException

xorBytes(byte[] a, byte[] b)

public static byte[] xorBytes(byte[] a, byte[] b)
Parameters
Name Description
a byte[]
b byte[]
Returns
Type Description
byte[]

Constructors

OpaqueUtil()

public OpaqueUtil()