Skip to content

Commit 78a1cab

Browse files
committed
deleted stateless processing
1 parent 5113002 commit 78a1cab

File tree

9 files changed

+6
-58
lines changed

9 files changed

+6
-58
lines changed

core/src/main/java/org/bouncycastle/crypto/StatelessProcessing.java

Lines changed: 0 additions & 9 deletions
This file was deleted.

core/src/main/java/org/bouncycastle/crypto/engines/AESEngine.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import org.bouncycastle.crypto.CryptoServicesRegistrar;
66
import org.bouncycastle.crypto.DataLengthException;
77
import org.bouncycastle.crypto.OutputLengthException;
8-
import org.bouncycastle.crypto.StatelessProcessing;
98
import org.bouncycastle.crypto.constraints.DefaultServiceProperties;
109
import org.bouncycastle.crypto.params.KeyParameter;
1110
import org.bouncycastle.util.Arrays;
@@ -35,7 +34,7 @@
3534
*
3635
*/
3736
public class AESEngine
38-
implements BlockCipher, StatelessProcessing
37+
implements BlockCipher
3938
{
4039
// The S box
4140
private static final byte[] S = {
@@ -589,11 +588,6 @@ private void decryptBlock(byte[] in, int inOff, byte[] out, int outOff, int[][]
589588
Pack.intToLittleEndian(C3, out, outOff + 12);
590589
}
591590

592-
public BlockCipher newInstance()
593-
{
594-
return new AESEngine();
595-
}
596-
597591
private int bitsOfSecurity()
598592
{
599593
if (WorkingKey == null)

core/src/main/java/org/bouncycastle/crypto/engines/AESLightEngine.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import org.bouncycastle.crypto.CryptoServicesRegistrar;
66
import org.bouncycastle.crypto.DataLengthException;
77
import org.bouncycastle.crypto.OutputLengthException;
8-
import org.bouncycastle.crypto.StatelessProcessing;
98
import org.bouncycastle.crypto.constraints.DefaultServiceProperties;
109
import org.bouncycastle.crypto.params.KeyParameter;
1110
import org.bouncycastle.util.Pack;
@@ -36,7 +35,7 @@
3635
*
3736
*/
3837
public class AESLightEngine
39-
implements BlockCipher, StatelessProcessing
38+
implements BlockCipher
4039
{
4140
// The S box
4241
private static final byte[] S = {
@@ -478,11 +477,6 @@ private void decryptBlock(byte[] in, int inOff, byte[] out, int outOff, int[][]
478477
Pack.intToLittleEndian(C3, out, outOff + 12);
479478
}
480479

481-
public BlockCipher newInstance()
482-
{
483-
return new AESLightEngine();
484-
}
485-
486480
private int bitsOfSecurity()
487481
{
488482
if (WorkingKey == null)

core/src/main/java/org/bouncycastle/crypto/engines/CamelliaEngine.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
import org.bouncycastle.crypto.CryptoServicesRegistrar;
66
import org.bouncycastle.crypto.DataLengthException;
77
import org.bouncycastle.crypto.OutputLengthException;
8-
import org.bouncycastle.crypto.StatelessProcessing;
98
import org.bouncycastle.crypto.constraints.DefaultServiceProperties;
109
import org.bouncycastle.crypto.params.KeyParameter;
1110

1211
/**
1312
* Camellia - based on RFC 3713.
1413
*/
1514
public class CamelliaEngine
16-
implements BlockCipher, StatelessProcessing
15+
implements BlockCipher
1716
{
1817
private boolean initialised = false;
1918
private int _keySize;
@@ -690,11 +689,6 @@ public void reset()
690689

691690
}
692691

693-
public BlockCipher newInstance()
694-
{
695-
return new CamelliaEngine();
696-
}
697-
698692
private int bitsOfSecurity()
699693
{
700694
return _keySize * 8;

core/src/main/java/org/bouncycastle/crypto/engines/CamelliaLightEngine.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import org.bouncycastle.crypto.CryptoServicesRegistrar;
66
import org.bouncycastle.crypto.DataLengthException;
77
import org.bouncycastle.crypto.OutputLengthException;
8-
import org.bouncycastle.crypto.StatelessProcessing;
98
import org.bouncycastle.crypto.constraints.DefaultServiceProperties;
109
import org.bouncycastle.crypto.params.KeyParameter;
1110

@@ -14,7 +13,7 @@
1413
*/
1514

1615
public class CamelliaLightEngine
17-
implements BlockCipher, StatelessProcessing
16+
implements BlockCipher
1817
{
1918
private static final int BLOCK_SIZE = 16;
2019
private static final int MASK8 = 0xff;
@@ -598,11 +597,6 @@ public void reset()
598597
{
599598
}
600599

601-
public BlockCipher newInstance()
602-
{
603-
return new CamelliaLightEngine();
604-
}
605-
606600
private int bitsOfSecurity()
607601
{
608602
return _keySize * 8;

core/src/main/java/org/bouncycastle/crypto/engines/SEEDEngine.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
import org.bouncycastle.crypto.CryptoServicesRegistrar;
66
import org.bouncycastle.crypto.DataLengthException;
77
import org.bouncycastle.crypto.OutputLengthException;
8-
import org.bouncycastle.crypto.StatelessProcessing;
98
import org.bouncycastle.crypto.constraints.DefaultServiceProperties;
109
import org.bouncycastle.crypto.params.KeyParameter;
1110

1211
/**
1312
* Implementation of the SEED algorithm as described in RFC 4009
1413
*/
1514
public class SEEDEngine
16-
implements BlockCipher, StatelessProcessing
15+
implements BlockCipher
1716
{
1817
private final int BLOCK_SIZE = 16;
1918

@@ -353,9 +352,4 @@ private int phaseCalc2(int r0, int ki0, int r1, int ki1)
353352
{
354353
return G(phaseCalc1(r0, ki0, r1, ki1) + G((r0 ^ ki0) ^ (r1 ^ ki1)));
355354
}
356-
357-
public BlockCipher newInstance()
358-
{
359-
return new SEEDEngine();
360-
}
361355
}

core/src/main/java/org/bouncycastle/crypto/engines/SerpentEngine.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.bouncycastle.crypto.engines;
22

3-
import org.bouncycastle.crypto.BlockCipher;
43
import org.bouncycastle.util.Pack;
54

65
/**
@@ -300,9 +299,4 @@ protected void decryptBlock(
300299
Pack.intToLittleEndian(X[2] ^ wKey[2], output, outOff + 8);
301300
Pack.intToLittleEndian(X[3] ^ wKey[3], output, outOff + 12);
302301
}
303-
304-
public BlockCipher newInstance()
305-
{
306-
return new SerpentEngine();
307-
}
308302
}

core/src/main/java/org/bouncycastle/crypto/engines/SerpentEngineBase.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
import org.bouncycastle.crypto.CryptoServicesRegistrar;
77
import org.bouncycastle.crypto.DataLengthException;
88
import org.bouncycastle.crypto.OutputLengthException;
9-
import org.bouncycastle.crypto.StatelessProcessing;
109
import org.bouncycastle.crypto.constraints.DefaultServiceProperties;
1110
import org.bouncycastle.crypto.params.KeyParameter;
1211

1312
public abstract class SerpentEngineBase
14-
implements BlockCipher, StatelessProcessing
13+
implements BlockCipher
1514
{
1615
protected static final int BLOCK_SIZE = 16;
1716

core/src/main/java/org/bouncycastle/crypto/engines/TnepresEngine.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.bouncycastle.crypto.engines;
22

3-
import org.bouncycastle.crypto.BlockCipher;
43
import org.bouncycastle.util.Pack;
54

65
/**
@@ -307,9 +306,4 @@ protected void decryptBlock(
307306
Pack.intToBigEndian(X[1] ^ wKey[1], output, outOff + 8);
308307
Pack.intToBigEndian(X[0] ^ wKey[0], output, outOff + 12);
309308
}
310-
311-
public BlockCipher newInstance()
312-
{
313-
return new TnepresEngine();
314-
}
315309
}

0 commit comments

Comments
 (0)