Skip to content

Commit 8aa0445

Browse files
committed
Reformatted Whitespaces/Comments
1 parent c833bd7 commit 8aa0445

File tree

868 files changed

+134
-964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

868 files changed

+134
-964
lines changed

Attacks/src/main/java/de/rub/nds/tlsattacker/attacks/pkcs1/oracles/Pkcs1Oracle.java

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616

1717
/**
1818
* Oracle template for Bleichenbacher/Manger attack.
19-
*
19+
*
2020
* @version 0.1 Jun 12, 2012
2121
*/
2222
public abstract class Pkcs1Oracle {
2323

24-
/** logger */
24+
/**
25+
* logger
26+
*/
2527
static Logger LOGGER = LogManager.getLogger(Pkcs1Oracle.class);
2628

2729
/*
@@ -49,7 +51,7 @@ public abstract class Pkcs1Oracle {
4951

5052
/**
5153
* Gets the blocksize of the encryption algorithm.
52-
*
54+
*
5355
* @return Blocksize
5456
*/
5557
public int getBlockSize() {
@@ -58,7 +60,7 @@ public int getBlockSize() {
5860

5961
/**
6062
* Gets the total number of queries performed by this oracle.
61-
*
63+
*
6264
* @return Number of queries
6365
*/
6466
public long getNumberOfQueries() {
@@ -67,7 +69,7 @@ public long getNumberOfQueries() {
6769

6870
/**
6971
* Gets the public key of this oracle.
70-
*
72+
*
7173
* @return Public key
7274
*/
7375
public PublicKey getPublicKey() {
@@ -76,17 +78,16 @@ public PublicKey getPublicKey() {
7678

7779
/**
7880
* Checks for PKCS conformity - 00 02 padding 00 pms
79-
*
80-
* @param msg
81-
* Encrypted message to check for conformity
81+
*
82+
* @param msg Encrypted message to check for conformity
8283
* @return True if PKCS conforming, else false
8384
*/
8485
public abstract boolean checkPKCSConformity(final byte[] msg) throws OracleException;
8586

8687
/**
8788
* Returns true if the oracle is a plaintext oracle (does not decrypt the
8889
* data received)
89-
*
90+
*
9091
* @return isPlaintextOracle
9192
*/
9293
public boolean isPlaintextOracle() {
@@ -95,7 +96,7 @@ public boolean isPlaintextOracle() {
9596

9697
/**
9798
* Returns the oracle type
98-
*
99+
*
99100
* @return
100101
*/
101102
public OracleType getOracleType() {
@@ -108,12 +109,19 @@ public void resetNumberOfQueries() {
108109

109110
/**
110111
* Oracle types defined in the Crypto'12 paper + specific oracles found
111-
* during our research TTT checks only 0x00 0x02 ... FFF checks 0x00 0x02 on
112-
* the beginning, the first 8 bytes cannot include 0x00 and the 0x00 byte
113-
* has to be set on a correct position XMLENC checks if the key has a
114-
* correct length (16, 24, or 32 bytes) BigIP checks only the second byte
115-
* 0x02 (the first 0x00 byte is not checked at all) MANGER_0x00 checks only
116-
* the first byte is equal to 0x00
112+
* during our research
113+
*
114+
* TTT checks only 0x00 0x02 ...
115+
*
116+
* FFF checks 0x00 0x02 on the beginning, the first 8 bytes cannot include
117+
* 0x00 and the 0x00 byte has to be set on a correct position
118+
*
119+
* XMLENC checks if the key has a correct length (16, 24, or 32 bytes)
120+
*
121+
* BigIP checks only the second byte 0x02 (the first 0x00 byte is not
122+
* checked at all)
123+
*
124+
* MANGER_0x00 checks only the first byte is equal to 0x00
117125
*/
118126
public enum OracleType {
119127

Attacks/src/test/java/de/rub/nds/tlsattacker/attacks/pkcs1/oracles/TestPkcs1Oracle.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ private boolean checkThird(final byte[] msg) {
143143
}
144144

145145
/**
146-
* JSSE bug Plaintext oracle, for testing purposes: Example for 256/512 byte
147-
* long RSA key: The oracle returns true if:
146+
* JSSE bug Plaintext oracle, for testing purposes:
147+
*
148+
* Example for 256/512 byte long RSA key:
149+
* The oracle returns true if:
148150
* <ul>
149151
* <li>first two bytes are equal to 0x00 0x02</li>
150152
* <li>the following 8 bytes do not contain 0x00</li>

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/certificate/CertificateAdapter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import javax.xml.bind.annotation.adapters.XmlAdapter;
1515
import org.bouncycastle.crypto.tls.Certificate;
1616

17-
1817
public class CertificateAdapter extends XmlAdapter<String, Certificate> {
1918

2019
@Override

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/certificate/CertificateByteChooser.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.apache.logging.log4j.LogManager;
1717
import org.apache.logging.log4j.Logger;
1818

19-
2019
public class CertificateByteChooser {
2120

2221
protected static final Logger LOGGER = LogManager.getLogger(CertificateByteChooser.class.getName());

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/certificate/X509CertificateObjectAdapter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import org.bouncycastle.crypto.tls.TlsUtils;
1818
import org.bouncycastle.jce.provider.X509CertificateObject;
1919

20-
2120
public class X509CertificateObjectAdapter extends XmlAdapter<String, X509CertificateObject> {
2221

2322
@Override

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/config/Config.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
import org.apache.logging.log4j.LogManager;
6565
import org.apache.logging.log4j.Logger;
6666

67-
6867
@XmlRootElement
6968
@XmlAccessorType(XmlAccessType.FIELD)
7069
public class Config implements Serializable {

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/config/ConfigIO.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import java.io.OutputStream;
1414
import javax.xml.bind.JAXB;
1515

16-
1716
public class ConfigIO {
1817
public static void write(Config config, File f) {
1918
JAXB.marshal(config, f);

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/config/TLSDelegateConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.apache.logging.log4j.LogManager;
1919
import org.apache.logging.log4j.Logger;
2020

21-
2221
public abstract class TLSDelegateConfig {
2322

2423
protected static final Logger LOGGER = LogManager.getLogger(TLSDelegateConfig.class.getName());

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/config/converters/ByteArrayConverter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import com.beust.jcommander.ParameterException;
1313
import de.rub.nds.modifiablevariable.util.ArrayConverter;
1414

15-
1615
public class ByteArrayConverter implements IStringConverter<byte[]> {
1716

1817
@Override

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/config/converters/SignatureAndHashAlgorithmConverter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import de.rub.nds.tlsattacker.core.constants.SignatureAlgorithm;
1515
import de.rub.nds.tlsattacker.core.constants.SignatureAndHashAlgorithm;
1616

17-
1817
public class SignatureAndHashAlgorithmConverter implements IStringConverter<SignatureAndHashAlgorithm> {
1918

2019
@Override

0 commit comments

Comments
 (0)