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

public Class AsconXof

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

Deprecated

Now superseded - please use AsconXof128

ASCON v1.2 XOF, https://ascon.iaik.tugraz.at/ .

https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/ascon-spec-final.pdf

ASCON v1.2 XOF with reference to C Reference Impl from: https://github.com/ascon/ascon-c .

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final String
pack-priv AsconXof.AsconParameters
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

algorithmNameback to summary
private final String algorithmName
asconParametersback to summary
pack-priv AsconXof.AsconParameters asconParameters
m_squeezingback to summary
private boolean m_squeezing

Constructor Detail

AsconXofback to summary
public AsconXof(AsconXof.AsconParameters parameters)

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
org.bouncycastle.crypto.digests back to summary

public final Enum AsconXof.AsconParameters

extends Enum<AsconXof.AsconParameters>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final AsconXof.AsconParameters
public static final AsconXof.AsconParameters

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static AsconXof.AsconParameters
public static AsconXof.AsconParameters[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AsconXofback to summary
public static final AsconXof.AsconParameters AsconXof
AsconXofAback to summary
public static final AsconXof.AsconParameters AsconXofA

Constructor Detail

AsconParametersback to summary
private AsconParameters()

Method Detail

valueOfback to summary
public static AsconXof.AsconParameters valueOf(String name)
valuesback to summary
public static AsconXof.AsconParameters[] values()