Top Description Fields Constructors Methods
org.bouncycastle.crypto.digests

public Class AsconXof128

extends AsconBaseDigest
implements Xof
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.Xof, org.bouncycastle.crypto.ExtendedDigest, org.bouncycastle.crypto.Digest
Imports
org.bouncycastle.crypto.Xof, org.bouncycastle.util.Pack

Ascon-XOF128 was introduced in NIST Special Publication (SP) 800-232 (Initial Public Draft).

Additional details and the specification can be found in: NIST SP 800-232 (Initial Public Draft). For reference source code and implementation details, please see: Reference, highly optimized, masked C and ASM implementations of Ascon (NIST SP 800-232).

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from org.bouncycastle.crypto.digests.AsconBaseDigest:
ASCON_HASH_RATEASCON_PB_ROUNDSCRYPTO_BYTESm_bufm_bufPosx0x1x2x3x4

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
doFinal(byte[]
output array to write the output bytes to.
output
,
int
offset to start writing the bytes at.
outOff
,
int
the number of output bytes requested.
outLen
)

Implements org.bouncycastle.crypto.Xof.doFinal.

Output the results of the final calculation for this digest to outLen number of bytes.

public int
doOutput(byte[]
output array to write the output bytes to.
output
,
int
offset to start writing the bytes at.
outOff
,
int
the number of output bytes requested.
outLen
)

Implements org.bouncycastle.crypto.Xof.doOutput.

Start outputting the results of the final calculation for this digest.

public String
public int
getByteLength()

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.getByteLength.

Implements org.bouncycastle.crypto.ExtendedDigest.getByteLength.

Return the size in bytes of the internal buffer the digest applies it's compression function to.

protected long
loadBytes(final byte[] bytes, int inOff)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.loadBytes.

protected long
loadBytes(final byte[] bytes, int inOff, int n)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.loadBytes.

protected long
protected void
public void
reset()

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.reset.

Implements org.bouncycastle.crypto.Digest.reset.

reset the digest back to it's initial state.

protected void
setBytes(long w, byte[] bytes, int inOff)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.setBytes.

protected void
setBytes(long w, byte[] bytes, int inOff, int n)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.setBytes.

public void
update(byte
the input byte to be entered.
in
)

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.update.

Implements org.bouncycastle.crypto.Digest.update.

update the message digest with a single byte.

public void
update(byte[]
the byte array containing the data.
input
,
int
the offset into the byte array where the data starts.
inOff
,
int
the length of the data.
len
)

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.update.

Implements org.bouncycastle.crypto.Digest.update.

update the message digest with a block of bytes.

Inherited from org.bouncycastle.crypto.digests.AsconBaseDigest:
doFinalgetDigestSizehashpsqueeze

Field Detail

m_squeezingback to summary
private boolean m_squeezing

Constructor Detail

AsconXof128back to summary
public AsconXof128()

Method Detail

doFinalback to summary
public int doFinal(byte[] output, int outOff, int outLen)

Implements org.bouncycastle.crypto.Xof.doFinal.

Doc from org.bouncycastle.crypto.Xof.doFinal.

Output the results of the final calculation for this digest to outLen number of bytes.

Parameters
output:byte[]

output array to write the output bytes to.

outOff:int

offset to start writing the bytes at.

outLen:int

the number of output bytes requested.

Returns:int

the number of bytes written

Annotations
@Override
doOutputback to summary
public int doOutput(byte[] output, int outOff, int outLen)

Implements org.bouncycastle.crypto.Xof.doOutput.

Doc from org.bouncycastle.crypto.Xof.doOutput.

Start outputting the results of the final calculation for this digest. Unlike doFinal, this method will continue producing output until the Xof is explicitly reset, or signals otherwise.

Parameters
output:byte[]

output array to write the output bytes to.

outOff:int

offset to start writing the bytes at.

outLen:int

the number of output bytes requested.

Returns:int

the number of bytes written

Annotations
@Override
getAlgorithmNameback to summary
public String getAlgorithmName()

Implements org.bouncycastle.crypto.Digest.getAlgorithmName.

Doc from org.bouncycastle.crypto.Digest.getAlgorithmName.

return the algorithm name

Returns:String

the algorithm name

Annotations
@Override
getByteLengthback to summary
public int getByteLength()

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.getByteLength.

Implements org.bouncycastle.crypto.ExtendedDigest.getByteLength.

Doc from org.bouncycastle.crypto.ExtendedDigest.getByteLength.

Return the size in bytes of the internal buffer the digest applies it's compression function to.

Returns:int

byte length of the digests internal buffer.

Annotations
@Override
loadBytesback to summary
protected long loadBytes(final byte[] bytes, int inOff)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.loadBytes.

loadBytesback to summary
protected long loadBytes(final byte[] bytes, int inOff, int n)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.loadBytes.

padback to summary
protected long pad(int i)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.pad.

padAndAbsorbback to summary
protected void padAndAbsorb()

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.padAndAbsorb.

resetback to summary
public void reset()

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.reset.

Implements org.bouncycastle.crypto.Digest.reset.

Doc from org.bouncycastle.crypto.Digest.reset.

reset the digest back to it's initial state.

Annotations
@Override
setBytesback to summary
protected void setBytes(long w, byte[] bytes, int inOff)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.setBytes.

setBytesback to summary
protected void setBytes(long w, byte[] bytes, int inOff, int n)

Implements abstract org.bouncycastle.crypto.digests.AsconBaseDigest.setBytes.

updateback to summary
public void update(byte in)

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.update.

Implements org.bouncycastle.crypto.Digest.update.

Doc from org.bouncycastle.crypto.Digest.update.

update the message digest with a single byte.

Parameters
in:byte

the input byte to be entered.

Annotations
@Override
updateback to summary
public void update(byte[] input, int inOff, int len)

Overrides org.bouncycastle.crypto.digests.AsconBaseDigest.update.

Implements org.bouncycastle.crypto.Digest.update.

Doc from org.bouncycastle.crypto.Digest.update.

update the message digest with a block of bytes.

Parameters
input:byte[]

the byte array containing the data.

inOff:int

the offset into the byte array where the data starts.

len:int

the length of the data.

Annotations
@Override