Skip to content

Commit

Permalink
Sphinx: add tests for multi-frame onions
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bast committed Apr 30, 2019
1 parent ea6c22e commit 356c3a2
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ object Sphinx extends Logging {
* shared secrets (one per node) can be used to parse returned error messages if needed
*/
def makePacket(sessionKey: PrivateKey, publicKeys: Seq[PublicKey], payloads: Seq[ByteVector], associatedData: ByteVector32): PacketAndSecrets = {
require(payloadFrameCount(payloads.last) == 1, "last packet should use a single frame")

val (ephemeralPublicKeys, sharedsecrets) = computeEphemeralPublicKeysAndSharedSecrets(sessionKey, publicKeys)
val filler = generateFiller("rho", sharedsecrets.dropRight(1), payloads.dropRight(1))

Expand Down
Loading

0 comments on commit 356c3a2

Please sign in to comment.