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

public Class PhotonBeetleDigest

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, .Bytes

Photon-Beetle, https://www.isical.ac.in/~lightweight/beetle/ https://csrc.nist.gov/CSRC/media/Projects/lightweight-cryptography/documents/finalist-round/updated-spec-doc/photon-beetle-spec-final.pdf

Photon-Beetle with reference to C Reference Impl from: https://github.com/PHOTON-Beetle/Software

Field Summary

Modifier and TypeField and Description
private ByteArrayOutputStream
private int
D

private int
private int
private int
private final int
private int
private byte[][]
private int
private byte[][]
private int
private int
S

private int
private byte[]
private int
private byte[]
private byte[][]
private int
private 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.

public String
public int
getDigestSize()

Implements org.bouncycastle.crypto.Digest.getDigestSize.

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

pack-priv void
public void
reset()

Implements org.bouncycastle.crypto.Digest.reset.

reset the digest back to it's initial state.

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 ByteArrayOutputStream buffer
Dback to summary
private int D
Dqback to summary
private int Dq
Drback to summary
private int Dr
DSquareback to summary
private int DSquare
INITIAL_RATE_INBYTESback to summary
private final int INITIAL_RATE_INBYTES
LAST_THREE_BITS_OFFSETback to summary
private int LAST_THREE_BITS_OFFSET
MixColMatrixback to summary
private byte[][] MixColMatrix
RATE_INBYTESback to summary
private int RATE_INBYTES
RCback to summary
private byte[][] RC
ROUNDback to summary
private int ROUND
Sback to summary
private int S
S_1back to summary
private int S_1
sboxback to summary
private byte[] sbox
SQUEEZE_RATE_INBYTESback to summary
private int SQUEEZE_RATE_INBYTES
stateback to summary
private byte[] state
state_2dback to summary
private byte[][] state_2d
STATE_INBYTESback to summary
private int STATE_INBYTES
TAG_INBYTESback to summary
private int TAG_INBYTES

Constructor Detail

PhotonBeetleDigestback to summary
public PhotonBeetleDigest()

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
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
PHOTON_Permutationback to summary
pack-priv void PHOTON_Permutation()
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
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