-- DennisHuo - 02 Feb 2009

Dennis Huo
2/1/09
CSC290A
HW 1

Files Included:

(Old functionality)
Encryptor.java - The abstract base class
Rot13Encryptor.java - Implementation of Rot13
VigenereEncryptor.java - Implementation of Vigenere
CompoundEncryptor.java - Recursive encryptor type


(New functionality)
Securable.java - Interface for key-strengthening encryptors
SecurableRot13Encryptor.java - Extension of Rot13Encryptor
SecurableVigenereEncryptor.java - Extension of Vigenere Encryptor
SecurableCompoundEncryptor.java - Extension of Compound Encryptor
PasswordUtil.java - Provides shared static method for password securing


(New type)
SecurableXOREncryptor.java - New implementation of XOR encryption


(Driver)
Tester.java - Runs through old and new encryptors

About:

This example problem seeks to define an abstract "encryptor" which is
capable of encrypting and decrypting arbitrary Strings according to
a given password/passphrase. For the basic implementations, the given
passphrase is simply repeated to obtain the number of characters in the
plaintext to be encrypted.


The extension of the basic classes seeks to avoid frequency-analysis
attacks, particularly in cases where the passphrase is very short
compared to the encrypted plaintext. In these cases, it is possible
to create several sub-problems to attack, where one set is solely the
text encrypted using the first letter of the passphrase, another set
for the second, etc. The Securable interface defines the "SecureEncrypt"
method, which algorithmically generates a longer passphrase from the
given passphrase with a broader distribution of letters, before invoking
the parent encryption method.


Although the interface permits each implementing class to secure the
password according to its own algorithm, PasswordUtil.java provides
a shared password-growing mechanism to reduce the amount of new code
written for the new functionality.

  • Encryptor.java: The base interface which defines the functionality of an "encryptor" module

  • Rot13Encryptor.java: Not strictly a Rot13 encryptor, since wrap-around is not actually used. The shift-13 is done arithmetically, independent of any charsets

  • CompoundEncryptor.java: This recursive type uses arbitrary sets of Encryptors to define a compound-encryption algorithm

  • Securable.java: An extension interface which defines "secure" encryption as passphrase processing mesaures which resist frequency-analysis attacks

  • SecurableXOREncryptor.java: New encryptor type which implements the Securable interface, but is still backwards-compatible with the old Encryptor interface

  • Tester.java: Driver class which tests all the Encryptor types for correctness
Topic attachments
I Attachment History Action Size Date Who Comment
Java source code filejava CompoundEncryptor.java r1 manage 0.7 K 2009-02-02 - 20:46 DennisHuo This recursive type uses arbitrary sets of Encryptors to define a compound-encryption algorithm
Java source code filejava Encryptor.java r1 manage 0.2 K 2009-02-02 - 20:43 DennisHuo The base interface which defines the functionality of an "encryptor" module
Java source code filejava PasswordUtil.java r1 manage 0.7 K 2009-02-02 - 20:49 DennisHuo Provides shared password-growing method
Java source code filejava Rot13Encryptor.java r1 manage 1.1 K 2009-02-02 - 20:44 DennisHuo Not strictly a Rot13 encryptor, since wrap-around is not actually used. The shift-13 is done arithmetically, independent of any charsets
Java source code filejava Securable.java r1 manage 0.3 K 2009-02-02 - 20:47 DennisHuo An extension interface which defines "secure" encryption as passphrase processing mesaures which resist frequency-analysis attacks
Java source code filejava SecurableCompoundEncryptor.java r1 manage 0.6 K 2009-02-02 - 20:49 DennisHuo Extends CompoundEncryptor
Java source code filejava SecurableRot13Encryptor.java r1 manage 0.5 K 2009-02-02 - 20:48 DennisHuo Extends Rot13Encryptor
Java source code filejava SecurableVigenereEncryptor.java r1 manage 0.5 K 2009-02-02 - 20:48 DennisHuo Extends VigenereEncryptor
Java source code filejava SecurableXOREncryptor.java r1 manage 1.2 K 2009-02-02 - 20:50 DennisHuo New encryptor type which implements the Securable interface, but is still backwards-compatible with the old Encryptor interface
Java source code filejava Tester.java r1 manage 2.5 K 2009-02-02 - 20:50 DennisHuo Driver class which tests all the Encryptor types for correctness
Java source code filejava VigenereEncryptor.java r1 manage 1.0 K 2009-02-02 - 20:45 DennisHuo The passphrase is used to determine the shift amount
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 2009-02-02 - DennisHuo
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback