Skip to content

Commit 6eec7cb

Browse files
committed
Fixed the javadoc
1 parent 872b343 commit 6eec7cb

File tree

16 files changed

+86
-35
lines changed

16 files changed

+86
-35
lines changed

Attacks/src/main/java/de/rub/nds/tlsattacker/attacks/ec/ICEAttacker.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,13 @@ private void attackOracle() {
177177
* compute the server private key with CRT.
178178
*
179179
* @param usedOracleEquations
180+
* The used oracle equations
180181
* @param congs
182+
* The congruences
181183
* @param modulis
184+
* The modulis
182185
* @param pointer
186+
* the pointer
183187
*/
184188
public void bruteForceWithAdditionalOracleEquations(int[] usedOracleEquations, BigInteger[] congs,
185189
BigInteger[] modulis, int pointer) {
@@ -209,9 +213,12 @@ public void bruteForceWithAdditionalOracleEquations(int[] usedOracleEquations, B
209213
* Computes CRT from a given combination of congs and modulis
210214
*
211215
* @param usedOracleEquations
216+
* The used oracle equations
212217
* @param congs
218+
* The congruences
213219
* @param modulis
214-
* @return
220+
* The modulis
221+
* @return CRTF
215222
*/
216223
private BigInteger computeCRTFromCombination(int[] usedOracleEquations, BigInteger[] congs, BigInteger[] modulis) {
217224
BigInteger[] usedCongs = new BigInteger[usedOracleEquations.length];
@@ -235,7 +242,8 @@ private int[] initializeUsedOracleEquations(int size) {
235242
* Uses the oracle to get a congruence for a specific point
236243
*
237244
* @param point
238-
* @return
245+
* A Point
246+
* @return The Congruence
239247
*/
240248
private BigInteger getCongruence(ICEPoint point) {
241249
BigInteger secretModOrder = BigInteger.ZERO;

Attacks/src/main/java/de/rub/nds/tlsattacker/attacks/ec/ICEPointReader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public class ICEPointReader {
2828
* this named curve
2929
*
3030
* @param namedCurve
31-
* @return
31+
* The NamedCurve as a String
32+
* @return the deserialized Points
3233
*/
3334
public static List<ICEPoint> readPoints(String namedCurve) {
3435
String namedCurveLow = namedCurve.toLowerCase();

Attacks/src/main/java/de/rub/nds/tlsattacker/attacks/ec/oracles/ECOracle.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ public abstract class ECOracle {
3434
* secret was guessed correctly.
3535
*
3636
* @param ecPoint
37+
* The Point
3738
* @param guessedSecret
38-
* @return
39+
* The guessed Secret
40+
* @return True if the secret is guessed correctly
3941
*/
4042
public abstract boolean checkSecretCorrectnes(Point ecPoint, BigInteger guessedSecret);
4143

@@ -45,7 +47,8 @@ public abstract class ECOracle {
4547
* correct.
4648
*
4749
* @param guessedSecret
48-
* @return
50+
* The guessed Secret
51+
* @return True if the Solution is correct
4952
*/
5053
public abstract boolean isFinalSolutionCorrect(BigInteger guessedSecret);
5154

Attacks/src/main/java/de/rub/nds/tlsattacker/attacks/impl/Attacker.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
/**
2525
* @param <Config>
26+
* The AttackConfig
2627
*/
2728
public abstract class Attacker<Config extends AttackConfig> {
2829

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ public class PKCS1VectorGenerator {
3737
* Generates different encrypted PKCS1 vectors
3838
*
3939
* @param publicKey
40+
* The publickey
4041
* @param type
41-
* @return
42+
* the type
43+
* @return pkcs1Vectors
4244
*/
4345
public static byte[][] generatePkcs1Vectors(RSAPublicKey publicKey, BleichenbacherCommandConfig.Type type) {
4446

@@ -70,8 +72,10 @@ public static byte[][] generatePkcs1Vectors(RSAPublicKey publicKey, Bleichenbach
7072
* Generates different plain PKCS1 vectors
7173
*
7274
* @param publicKey
75+
* The publickey
7376
* @param type
74-
* @return
77+
* the type
78+
* @return pkcs1Vectors
7579
*/
7680
public static byte[][] generatePlainPkcs1Vectors(RSAPublicKey publicKey, BleichenbacherCommandConfig.Type type) {
7781
// we do not need secure random here
@@ -115,7 +119,7 @@ public static byte[][] generatePlainPkcs1Vectors(RSAPublicKey publicKey, Bleiche
115119
* rsa key length in bytes
116120
* @param symmetricKeyLength
117121
* symmetric key length in bytes
118-
* @return
122+
* @return padded key
119123
*/
120124
private static byte[] getPaddedKey(int rsaKeyLength, byte[] symmetricKey) {
121125
byte[] key = new byte[rsaKeyLength];
@@ -194,8 +198,10 @@ private static byte[] getEK_SymmetricKeyOfSize(int rsaKeyLength, byte[] symmetri
194198

195199
/**
196200
* @param rsaKeyLength
201+
* rsakeylength
197202
* @param symmetricKey
198-
* @return
203+
* symmetric key
204+
* @return differentpositions
199205
*/
200206
private static byte[][] getEK_DifferentPositionsOf0x00(int rsaKeyLength, byte[] symmetricKey) {
201207
byte[][] result = new byte[rsaKeyLength - 2][];

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/constants/BulkCipherAlgorithm.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ public enum BulkCipherAlgorithm {
2828

2929
/**
3030
* @param cipherSuite
31-
* @return
31+
* The CipherSuite to choose the BulkCipherAlgorithm from
32+
* @return The BulkCipherAlgorithm of the Ciphersuite
3233
*/
3334
public static BulkCipherAlgorithm getBulkCipherAlgorithm(CipherSuite cipherSuite) {
3435
String cipher = cipherSuite.toString().toUpperCase();

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/protocol/handler/ProtocolMessageHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public byte[] prepareMessage(Message message) {
6060
* hooks.
6161
*
6262
* @param message
63+
* The message that should be prepared
64+
* @param withPrepare
65+
* if the prepare function should be called or only the rest
6366
* @return message in bytes
6467
*/
6568
public byte[] prepareMessage(Message message, boolean withPrepare) {

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/record/cipher/RecordBlockCipher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ private void setNextIv(byte[] ciphertext) {
136136
* correctly padded data
137137
* @return The raw decrypted Bytes
138138
* @throws CryptoException
139+
* If something goes wrong during decryption
139140
*/
140141
@Override
141142
public byte[] decrypt(byte[] data) throws CryptoException {

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/state/ContextContainer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public class ContextContainer {
5050
/**
5151
* Get the only defined TLS context.
5252
* <p>
53+
* </p>
5354
* Convenience method, useful when working with a single context only.
5455
*
5556
* @return the only known TLS context
5657
* @throws ConfigurationException
5758
* if there is more than one TLS context in the container
5859
*
59-
* @see this.getTlsContext(String)
6060
*/
6161
public TlsContext getTlsContext() {
6262
if (tlsContexts.isEmpty()) {
@@ -75,8 +75,6 @@ public TlsContext getTlsContext() {
7575
* @throws ConfigurationException
7676
* if there is no TLS context with the given alias
7777
*
78-
* @see this.getTlsContext() convenience method for accessing single
79-
* contexts
8078
*/
8179
public TlsContext getTlsContext(String alias) {
8280
TlsContext ctx = tlsContexts.get(alias);
@@ -158,6 +156,7 @@ public void removeTlsContext(String alias) {
158156
/**
159157
* Replace existing TlsContext with new TlsContext.
160158
* <p>
159+
* </p>
161160
* The TlsContext can only be replaced if the connection of both the new and
162161
* the old TlsContext equal.
163162
*

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/state/State.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
* TLS contexts for workflow execution. These contexts should be considered as
4444
* dynamic objects, representing TLS connections, calculations and other data
4545
* exchanged during the TLS actual workflow execution.
46-
* <p>
46+
* </p>
4747
*
4848
* <p>
4949
* Therefore, there is no public interface for setting TLS contexts manually.
5050
* They are always automatically created based on the connections defined in the
5151
* workflow trace.
52-
* <p>
52+
* </p>
5353
*
5454
* <p>
5555
* Please also have a look at the tests supplied with this class for some
@@ -153,6 +153,7 @@ public WorkflowTrace getOriginalWorkflowTrace() {
153153
* existingTlsContext.connection equals newTlsContext.connection.
154154
*
155155
* @param newTlsContext
156+
* The new TlsContext to replace the old with
156157
*/
157158
public void replaceTlsContext(TlsContext newTlsContext) {
158159
contextContainer.replaceTlsContext(newTlsContext);
@@ -169,9 +170,7 @@ public void replaceTlsContext(TlsContext newTlsContext) {
169170
* TODO: Ideally, this would return a deep copy to prevent State
170171
* invalidation.
171172
*
172-
* @return the only context known to the state <<<<<<< HEAD
173-
* @see this.getTlsContext(String) =======
174-
* @see #getTlsContext(java.lang.String) >>>>>>> origin/master
173+
* @return the only context known to the state
175174
*/
176175
public TlsContext getTlsContext() {
177176
return contextContainer.getTlsContext();
@@ -181,19 +180,17 @@ public TlsContext getTlsContext() {
181180
* Get TLS context with given alias. Aliases are the ones assigned to the
182181
* corresponding connection ends.
183182
*
184-
* <<<<<<< HEAD Note: Be careful when changing the context. I.e. if you
185-
* change it's connection, the state can get out of sync.
183+
* Note: Be careful when changing the context. I.e. if you change it's
184+
* connection, the state can get out of sync.
186185
*
187186
* TODO: Ideally, this would return a deep copy to prevent State
188187
* invalidation.
189188
*
190-
* =======
191189
*
192190
* @param alias
193-
* The Alias for which the TLSContext should be returned >>>>>>>
194-
* origin/master
191+
* The Alias for which the TLSContext should be returned
192+
*
195193
* @return the context with the given connection end alias
196-
* @see #getTlsContext()
197194
*/
198195
public TlsContext getTlsContext(String alias) {
199196
return contextContainer.getTlsContext(alias);

0 commit comments

Comments
 (0)