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

public Class AsconCXof128

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.DataLengthException, .OutputLengthException, .Xof, org.bouncycastle.util.Pack

Ascon-CXOF128 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
private final long
private final long
private final long
private final long
private final long
Inherited from org.bouncycastle.crypto.digests.AsconBaseDigest:
ASCON_HASH_RATEASCON_PB_ROUNDSCRYPTO_BYTESm_bufm_bufPosx0x1x2x3x4

Constructor Summary

AccessConstructor and Description
public
public
AsconCXof128(byte[] s)

public
AsconCXof128(byte[] s, int off, int len)

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
private void
initState(byte[] z, int zOff, int zLen)

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:
doFinalgetByteLengthgetDigestSizehashpsqueeze

Field Detail

m_squeezingback to summary
private boolean m_squeezing
z0back to summary
private final long z0
z1back to summary
private final long z1
z2back to summary
private final long z2
z3back to summary
private final long z3
z4back to summary
private final long z4

Constructor Detail

AsconCXof128back to summary
public AsconCXof128()
AsconCXof128back to summary
public AsconCXof128(byte[] s)
AsconCXof128back to summary
public AsconCXof128(byte[] s, int off, int len)

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
initStateback to summary
private void initState(byte[] z, int zOff, int zLen)
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