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

public Class XoodyakDigest

extends Object
implements Digest
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.Digest
Imports
java.io.ByteArrayOutputStream, org.bouncycastle.crypto.DataLengthException, .Digest, .OutputLengthException, org.bouncycastle.util.Arrays, .Integers, .Pack

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

Xoodyak with reference to C Reference Impl from: https://github.com/XKCP/XKCP

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private final ByteArrayOutputStream
private final int
private final int
private XoodyakDigest.MODE
private int
private final int
private final int
private int
private final int[]
private final int
private byte[]
private final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int
doFinal(byte[]
the array the digest is to be copied into.
output
,
int
the offset into the out array the digest is to start at.
outOff
)

Implements org.bouncycastle.crypto.Digest.doFinal.

close the digest, producing the final digest value.

pack-priv void
Down(byte[] Xi, int XiOff, int XiLen, int Cd)

public String
public int
getDigestSize()

Implements org.bouncycastle.crypto.Digest.getDigestSize.

return the size, in bytes, of the digest produced by this message digest.

public void
reset()

Implements org.bouncycastle.crypto.Digest.reset.

reset the digest back to it's initial state.

private void
Up(byte[] Yi, int YiOff, int YiLen, int Cu)

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

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
)

Implements org.bouncycastle.crypto.Digest.update.

update the message digest with a block of bytes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private final ByteArrayOutputStream buffer
f_bPrimeback to summary
private final int f_bPrime
MAXROUNDSback to summary
private final int MAXROUNDS
modeback to summary
private XoodyakDigest.MODE mode
phaseback to summary
private int phase
PhaseDownback to summary
private final int PhaseDown
PhaseUpback to summary
private final int PhaseUp
Rabsorbback to summary
private int Rabsorb
RCback to summary
private final int[] RC
Rhashback to summary
private final int Rhash
stateback to summary
private byte[] state
TAGLENback to summary
private final int TAGLEN

Constructor Detail

XoodyakDigestback to summary
public XoodyakDigest()

Method Detail

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

Implements org.bouncycastle.crypto.Digest.doFinal.

Doc from org.bouncycastle.crypto.Digest.doFinal.

close the digest, producing the final digest value. The doFinal call leaves the digest reset.

Parameters
output:byte[]

the array the digest is to be copied into.

outOff:int

the offset into the out array the digest is to start at.

Annotations
@Override
Downback to summary
pack-priv void Down(byte[] Xi, int XiOff, int XiLen, int Cd)
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
getDigestSizeback to summary
public int getDigestSize()

Implements org.bouncycastle.crypto.Digest.getDigestSize.

Doc from org.bouncycastle.crypto.Digest.getDigestSize.

return the size, in bytes, of the digest produced by this message digest.

Returns:int

the size, in bytes, of the digest produced by this message digest.

Annotations
@Override
resetback to summary
public void 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
Upback to summary
private void Up(byte[] Yi, int YiOff, int YiLen, int Cu)
updateback to summary
public void update(byte input)

Implements org.bouncycastle.crypto.Digest.update.

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

update the message digest with a single byte.

Parameters
input:byte

the input byte to be entered.

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

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

pack-priv final Enum XoodyakDigest.MODE

extends Enum<XoodyakDigest.MODE>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final XoodyakDigest.MODE
public static final XoodyakDigest.MODE

Constructor Summary

AccessConstructor and Description
private
MODE()

Method Summary

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

Field Detail

ModeHashback to summary
public static final XoodyakDigest.MODE ModeHash
ModeKeyedback to summary
public static final XoodyakDigest.MODE ModeKeyed

Constructor Detail

MODEback to summary
private MODE()

Method Detail

valueOfback to summary
public static XoodyakDigest.MODE valueOf(String name)
valuesback to summary
public static XoodyakDigest.MODE[] values()