diff --git a/allclasses-frame.html b/allclasses-frame.html index afaaf10..361f419 100644 --- a/allclasses-frame.html +++ b/allclasses-frame.html @@ -2,9 +2,9 @@
- +ad - The associated data, or null if there is none.ciphertext - The buffer containing the ciphertext to decrypt.ciphertextOffset - The offset within the ciphertext buffer of
the first byte of ciphertext data.plaintext - The buffer to place the plaintext in. This can be
@@ -321,7 +321,7 @@ extends Throws:
javax.crypto.ShortBufferException - The plaintext buffer does not have
enough space to store the decrypted data.javax.crypto.AEADBadTagException - The MAC value failed to verify.javax.crypto.BadPaddingException - The MAC value failed to verify.java.lang.IllegalStateException - The nonce has wrapped around.
The plaintext and ciphertext buffers can be the same for in-place
@@ -351,14 +351,10 @@ extends void setNonce(long nonce)
nonce - The new nonce value, which must be greater than or equal
- to the current value.java.lang.IllegalArgumentException - The nonce is less than the current value.
+ to the current value.
- Note that in this implementation, nonces are 63-bit quantities.
- The Noise specification normally allows for 64-bit nonces.
-
- Thie function is intended for testing purposes only.voidfallback(java.lang.String patternName)
+intgetAction()
DHStategetFixedEphemeralKey()
byte[]getHandshakeHash()
DHStategetLocalKeyPair()
java.lang.StringgetProtocolName()
DHStategetRemotePublicKey()
intgetRole()
booleanhasLocalKeyPair()
booleanhasPreSharedKey()
booleanhasRemotePublicKey()
booleanneedsLocalKeyPair()
booleanneedsPreSharedKey()
booleanneedsRemotePublicKey()
intreadMessage(byte[] message,
int messageOffset,
@@ -316,7 +322,7 @@ implements Reads a message payload during the handshake.
voidsetPreSharedKey(byte[] key,
int offset,
@@ -324,7 +330,7 @@ implements Sets the pre-shared key for this handshake.
voidsetPrologue(byte[] prologue,
int offset,
@@ -332,14 +338,14 @@ implements Sets the prologue for this handshake.
CipherStatePairsplit()
CipherStatePairsplit(byte[] secondaryKey,
int offset,
@@ -348,13 +354,13 @@ implements
+
void
start()
Starts the handshake running.
-
+
int
writeMessage(byte[] message,
int messageOffset,
@@ -708,8 +714,8 @@ implements See Also: getAction(),
+ fallback handshake pattern without first calling fallback() on a
+ previous handshake.See Also: getAction(),
writeMessage(byte[], int, byte[], int, int),
readMessage(byte[], int, int, byte[], int),
fallback()
@@ -725,11 +731,11 @@ implements Falls back to the "XXfallback" handshake pattern.
- This function is used to help implement the "Noise Pipes" protocol.
- It resets a HandshakeState object with the handshake pattern "IK",
- converting it into an object with the handshake pattern "XXfallback".
- Information from the previous session such as the local keypair,
- the initiator's ephemeral key, the prologue value, and the
+ This function is intended used to help implement the "Noise Pipes" protocol.
+ It resets a HandshakeState object with the original handshake pattern
+ (usually "IK"), converting it into an object with the handshake pattern
+ "XXfallback". Information from the previous session such as the local
+ keypair, the initiator's ephemeral key, the prologue value, and the
pre-shared key, are passed to the new session.
Once the fallback has been initiated, the application can set
@@ -739,13 +745,55 @@ implements Throws:
-java.lang.UnsupportedOperationException - The handshake pattern is
- not currently set to "IK".
+java.lang.UnsupportedOperationException - The current handshake pattern
+ is not compatible with "XXfallback".
+java.lang.IllegalStateException - The previous protocol has not started
+ or it has not reached the fallback position yet.
+java.security.NoSuchAlgorithmException - One of the cryptographic algorithms
+ that is specified in the new protocolName is not supported.See Also: start()
+
+
+
+
+
+
+-
+
fallback
+public void fallback(java.lang.String patternName)
+ throws java.security.NoSuchAlgorithmException
+Falls back to another handshake pattern.
+- Parameters:
patternName - The name of the pattern to fall back to;
+ e.g. "XXfallback", "NXfallback", etc.
+
+ This function resets a HandshakeState object with the original
+ handshake pattern, and converts it into an object with the new handshake
+ patternName. Information from the previous session such as the local
+ keypair, the initiator's ephemeral key, the prologue value, and the
+ pre-shared key, are passed to the new session.
+
+ Once the fallback has been initiated, the application can set
+ new values for the handshake parameters if the values from the
+ previous session do not apply. For example, the application may
+ use a different prologue for the fallback than for the original
+ session.
+
+ After setting any new parameters, the application calls start()
+ again to restart the handshake from where it left off before the fallback.
+
+ The new pattern may have greater key requirements than the original;
+ for example changing from "NK" from "XXfallback" requires that the
+ initiator's static public key be set. The application is responsible for
+ setting any extra keys before calling start().
+
+ Note that this function reverses the roles of initiator and responder.
+- Throws:
+java.lang.UnsupportedOperationException - The current handshake pattern
+ is not compatible with the patternName, or patternName is not a
+ fallback pattern.
java.lang.IllegalStateException - The previous protocol has not started
or it has not reached the fallback position yet.
java.security.NoSuchAlgorithmException - One of the cryptographic algorithms
@@ -806,7 +854,7 @@ implements Reads a message payload during the handshake.
- Parameters:
message - Buffer containing the incoming handshake
that was read from the transport.messageOffset - Offset of the first message byte.messageLength - The length of the incoming message.payload - Buffer that will be populated with the message payload.payloadOffset - Offset of the first byte in the
@@ -817,7 +865,7 @@ implements See Also:getAction(),
writeMessage(byte[], int, byte[], int, int)
diff --git a/com/southernstorm/noise/protocol/Noise.html b/com/southernstorm/noise/protocol/Noise.html
index 7d2c722..da9154a 100644
--- a/com/southernstorm/noise/protocol/Noise.html
+++ b/com/southernstorm/noise/protocol/Noise.html
@@ -2,9 +2,9 @@
-
+
Noise (Noise-Java)
-
+
@@ -177,6 +177,12 @@ extends java.lang.Object
Generates random data using the system random number generator.
+
+static void
+setForceFallbacks(boolean force)
+Force the use of plain Java fallback crypto implementations.
+
+
+
+
+
+
+-
+
setForceFallbacks
+public static void setForceFallbacks(boolean force)
+Force the use of plain Java fallback crypto implementations.
+- Parameters:
force - Set to true for force fallbacks, false to
+ try to use the system implementation before falling back.
+
+ This function is intended for testing purposes to toggle between
+ the system JCA/JCE implementations and the plain Java fallback
+ reference implementations.
+
+
diff --git a/com/southernstorm/noise/protocol/package-frame.html b/com/southernstorm/noise/protocol/package-frame.html
index 934805a..6e4a48d 100644
--- a/com/southernstorm/noise/protocol/package-frame.html
+++ b/com/southernstorm/noise/protocol/package-frame.html
@@ -2,9 +2,9 @@
-
+
com.southernstorm.noise.protocol (Noise-Java)
-
+
diff --git a/com/southernstorm/noise/protocol/package-summary.html b/com/southernstorm/noise/protocol/package-summary.html
index c8d186b..9a0d131 100644
--- a/com/southernstorm/noise/protocol/package-summary.html
+++ b/com/southernstorm/noise/protocol/package-summary.html
@@ -2,9 +2,9 @@
-
+
com.southernstorm.noise.protocol (Noise-Java)
-
+
diff --git a/com/southernstorm/noise/protocol/package-tree.html b/com/southernstorm/noise/protocol/package-tree.html
index 3d21a6f..36070da 100644
--- a/com/southernstorm/noise/protocol/package-tree.html
+++ b/com/southernstorm/noise/protocol/package-tree.html
@@ -2,9 +2,9 @@
-
+
com.southernstorm.noise.protocol Class Hierarchy (Noise-Java)
-
+
diff --git a/constant-values.html b/constant-values.html
index 5a7e545..1c30f3a 100644
--- a/constant-values.html
+++ b/constant-values.html
@@ -2,9 +2,9 @@
-
+
Constant Field Values (Noise-Java)
-
+
diff --git a/deprecated-list.html b/deprecated-list.html
index c6affff..75caeb3 100644
--- a/deprecated-list.html
+++ b/deprecated-list.html
@@ -2,9 +2,9 @@
-
+
Deprecated List (Noise-Java)
-
+
diff --git a/help-doc.html b/help-doc.html
index 5810e5a..a5cfb8c 100644
--- a/help-doc.html
+++ b/help-doc.html
@@ -2,9 +2,9 @@
-
+
API Help (Noise-Java)
-
+
diff --git a/index-all.html b/index-all.html
index f612bcf..5b485c5 100644
--- a/index-all.html
+++ b/index-all.html
@@ -2,9 +2,9 @@
-
+
Index (Noise-Java)
-
+
@@ -160,6 +160,10 @@
Falls back to the "XXfallback" handshake pattern.
+fallback(String) - Method in class com.southernstorm.noise.protocol.HandshakeState
+
+Falls back to another handshake pattern.
+
fork(byte[], int) - Method in interface com.southernstorm.noise.protocol.CipherState
Creates a new instance of this cipher and initializes it with a key.
@@ -386,6 +390,10 @@
Destroys the receiving CipherState and retains only the sending CipherState.
+ setForceFallbacks(boolean) - Static method in class com.southernstorm.noise.protocol.Noise
+
+Force the use of plain Java fallback crypto implementations.
+
setNonce(long) - Method in interface com.southernstorm.noise.protocol.CipherState
Sets the nonce value.
diff --git a/index.html b/index.html
index 846935f..2900daf 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
-
+
Noise-Java