Class Sauron

  extended by Sauron

public final class Sauron
extends java.lang.Object

This class implements the elements of a Sauronqueue. This class was created to make the Fcdebug UI more responsive by making Feralcore respond faster to Fcdebug requests. The problem is that the BigInteger modular exponentiation routine is very time consuming when the exponent is 4096 bits long.

Sauron is the element making up an incoming queue (a Sauronqueue) of fcsend hybrid encrypted packets. A new incoming packet is enqueued. Each element in the queue takes multiple passes to decipher. The one big modular exponentiation is broken into 3 computations over time in the main "while" event loop in Feralcore. The packet is dequeued and requeued multiple times to do each of these 3 computations. Finally, when it is ready, it is fully decrypted and processed. This queue will process all incoming hybrid encrypted packets. Be sure to include timing analysis defenses.

Feralcore.handlepacketreceive() adds an element to this new queue when it is found that the element is not a hello packet nor an Fcdebug request. The queue element type should be a new immutable type with a constructor that takes the encrypted packet as input. This constructor parses out the ElGamal ciphertext A from (A,B) and stores the immutable A^{-1} internally. The queue processor computes (A^{-1})^x over the next 3 stages. ElGamal decryption is then simply B*(A^{-1})^x mod p. A is the first (4096/8) bytes of the ciphertext blob.

The main Feralcore while loop dequeues and requeues elements from this new queue until they are fully deciphered.

The main while loop in Feralcore dequeues elements. When it dequeues on that is fully deciphered it moves the plaintext data to one of these queues: queuefcprogsndrequest,queuefcpingrequestmsg, queuefcdapingresponse.

Constructor Summary
Sauron(ByteArray msgrawin, java.math.BigInteger Ain, java.math.BigInteger Bin, ByteArray xarr)
          The value xarr is the ElGamal private key of the Feralcore node.
Method Summary
 java.math.BigInteger getB()
 java.math.BigInteger getinvAtoX()
 ByteArray getmsgraw()
 boolean infinalstate()
 Sauron nextstatefactory()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Sauron(ByteArray msgrawin,
              java.math.BigInteger Ain,
              java.math.BigInteger Bin,
              ByteArray xarr)
       throws FeralcoreException
The value xarr is the ElGamal private key of the Feralcore node.

Method Detail


public Sauron nextstatefactory()
                        throws FeralcoreException


public boolean infinalstate()


public java.math.BigInteger getinvAtoX()
                                throws FeralcoreException


public java.math.BigInteger getB()


public ByteArray getmsgraw()