Top Description Fields Constructors Methods
org.bouncycastle.pqc.crypto.sphincsplus

pack-priv Class HarakaSBase

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.pqc.crypto.sphincsplus.HarakaSXof, org.bouncycastle.pqc.crypto.sphincsplus.HarakaS256Digest, org.bouncycastle.pqc.crypto.sphincsplus.HarakaS512Digest
Imports
org.bouncycastle.util.Arrays

Haraka-512 v2, https://eprint.iacr.org/2016/098.pdf

Haraka512-256 with reference to Python Reference Impl from: https://github.com/sphincs/sphincsplus

Field Summary

Modifier and TypeField and Description
protected final byte[]
protected int[][]
protected long[][]
protected int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private void
addRoundKey(long[] q, long[] sk)

private void
addRoundKey32(int[] q, int[] sk)

private void
private void
brAesCt64InterleaveIn(long[] q, int qPos, int[] w, int startPos)

private void
brAesCt64InterleaveOut(int[] w, long[] q, int pos)

private void
brAesCt64Ortho(long[] q)

private static void
private void
brAesCtOrtho(int[] q)

private int
brDec32Le(byte[] input, int startPos)

private void
brEnc32Le(byte[] dst, int x, int startPos)

private void
brRangeDec32Le(byte[] input, int[] output, int inputPos)

protected void
haraka256Perm(byte[] output)

protected void
haraka512Perm(byte[] output)

protected void
interleaveConstant(long[] output, byte[] input, int startPos)

protected void
interleaveConstant32(int[] output, byte[] input, int startPos)

private void
mixColumns(long[] q)

private void
mixColumns32(int[] q)

protected void
private int
rotr16(int x)

private long
rotr32(long x)

private void
shiftRows(long[] q)

private void
shiftRows32(int[] q)

private void
Swapn(long[] q, int s, int pos1, int pos2)

private void
Swapn32(int[] q, int s, int pos1, int pos2)

protected static void
xor(byte[] x, int xOff, byte[] y, int yOff, byte[] z, int zOff, int zLen)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
protected final byte[] buffer
haraka256_rcback to summary
protected int[][] haraka256_rc
haraka512_rcback to summary
protected long[][] haraka512_rc
offback to summary
protected int off

Constructor Detail

HarakaSBaseback to summary
protected HarakaSBase()

Method Detail

addRoundKeyback to summary
private void addRoundKey(long[] q, long[] sk)
addRoundKey32back to summary
private void addRoundKey32(int[] q, int[] sk)
brAesCt64BitsliceSboxback to summary
private void brAesCt64BitsliceSbox(long[] q)
brAesCt64InterleaveInback to summary
private void brAesCt64InterleaveIn(long[] q, int qPos, int[] w, int startPos)
brAesCt64InterleaveOutback to summary
private void brAesCt64InterleaveOut(int[] w, long[] q, int pos)
brAesCt64Orthoback to summary
private void brAesCt64Ortho(long[] q)
brAesCtBitsliceSboxback to summary
private static void brAesCtBitsliceSbox(int[] q)
brAesCtOrthoback to summary
private void brAesCtOrtho(int[] q)
brDec32Leback to summary
private int brDec32Le(byte[] input, int startPos)
brEnc32Leback to summary
private void brEnc32Le(byte[] dst, int x, int startPos)
brRangeDec32Leback to summary
private void brRangeDec32Le(byte[] input, int[] output, int inputPos)
haraka256Permback to summary
protected void haraka256Perm(byte[] output)
haraka512Permback to summary
protected void haraka512Perm(byte[] output)
interleaveConstantback to summary
protected void interleaveConstant(long[] output, byte[] input, int startPos)
interleaveConstant32back to summary
protected void interleaveConstant32(int[] output, byte[] input, int startPos)
mixColumnsback to summary
private void mixColumns(long[] q)
mixColumns32back to summary
private void mixColumns32(int[] q)
resetback to summary
protected void reset()
rotr16back to summary
private int rotr16(int x)
rotr32back to summary
private long rotr32(long x)
shiftRowsback to summary
private void shiftRows(long[] q)
shiftRows32back to summary
private void shiftRows32(int[] q)
Swapnback to summary
private void Swapn(long[] q, int s, int pos1, int pos2)
Swapn32back to summary
private void Swapn32(int[] q, int s, int pos1, int pos2)
xorback to summary
protected static void xor(byte[] x, int xOff, byte[] y, int yOff, byte[] z, int zOff, int zLen)