2017-02-25 23:40:03 -08:00
2017-02-25 23:39:44 -08:00
2017-02-25 23:39:32 -08:00
2017-02-25 23:39:56 -08:00
2016-09-08 19:34:23 -07:00
2016-09-08 19:34:23 -07:00
2016-09-08 20:17:34 -07:00

java-crypto

Code for doing cryptography in Java.

Crypto Math Classes

Crypto Math: Modular Arithmetic

The Modular Arithmetic class is a static class with methods useful in doing modular arithmetic. These include finding gcds, factoring modulo a number, computing exponents, finding inverses, etc.

  • gcd(a,b)
  • extendedEuclidian(xy[], a, b)
  • solve(a,c,n)
  • inverseMod(a,n)

Cipher Implementations:

Cipher Implementation: Caesar Cipher

The Caesar class implements the Caesar cipher, which is a simple rotation (ROT) cipher with a key between 0 and 25.

Cipher Implementation: Affine Cipher

The Affine class implements the Affine cipher, which implements both a multiplicative and an additive shift. The key has two parts.

If the letters are indexed from 0 to 25, they are shifted according to the formula: formula:

a x + b (mod 26)

where a is the first part of the key and b is the second part of the key. This requires that gcd(a,26) = 1.

Description
Code for doing crypto-stuff in Java.
Readme 6.5 MiB
Languages
Java 100%