MINA SSHD
  1. MINA SSHD
  2. SSHD-13

Avoid SecureRandom.generateSeed on every SSH connection

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.0
    • Labels:
      None

      Description

      Avoid SecureRandom.generateSeed on every SSH connection

      This is easily 38.9% of our CPU time when establishing a new SSH session. For applications that build and tear down sessions at a high rate, losing ~39% of the time to building a temporary PRNG just for that session is a fairly large waste.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        10h 54m 1 Guillaume Nodet 06/Feb/09 08:40
        Guillaume Nodet made changes -
        Fix Version/s 0.1.0 [ 12314131 ]
        Guillaume Nodet made changes -
        Assignee Guillaume Nodet [ gnt ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Guillaume Nodet added a comment -

        Changed to only use a single PRNG instance.

        Sending trunk/src/main/java/org/apache/sshd/SshClient.java
        Sending trunk/src/main/java/org/apache/sshd/SshServer.java
        Adding trunk/src/main/java/org/apache/sshd/common/random/SingletonRandomFactory.java
        Sending trunk/src/test/java/org/apache/sshd/CipherTest.java
        Adding trunk/src/test/java/org/apache/sshd/LoadTest.java
        Sending trunk/src/test/resources/log4j.properties
        Transmitting file data ......
        Committed revision 741470.

        Show
        Guillaume Nodet added a comment - Changed to only use a single PRNG instance. Sending trunk/src/main/java/org/apache/sshd/SshClient.java Sending trunk/src/main/java/org/apache/sshd/SshServer.java Adding trunk/src/main/java/org/apache/sshd/common/random/SingletonRandomFactory.java Sending trunk/src/test/java/org/apache/sshd/CipherTest.java Adding trunk/src/test/java/org/apache/sshd/LoadTest.java Sending trunk/src/test/resources/log4j.properties Transmitting file data ...... Committed revision 741470.
        Shawn Pearce made changes -
        Field Original Value New Value
        Attachment generate_seed.patch [ 12399595 ]
        Shawn Pearce created issue -

          People

          • Assignee:
            Guillaume Nodet
            Reporter:
            Shawn Pearce
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development