mirror of
https://github.com/Geprivilegieerde-Anonimiteit-BV/XACrypto.git
synced 2026-08-21 21:46:23 -04:00
Ciphers (#17)
* add AES.java additions + Galois.java * desc used ECB and ECBExceptionless instead of seperate interfaces. AESECB done * Twofish ECB developments, moved some files * twofishecb done * Update Factories.java factories.java topology rewrite 👍 * Update Factories.java fix whitespace + forgot to add AriaGCM + SerpentGCM * desc RC6ECB.java placeholders, LE32.java * encblk+decblk funcs * RC6 done * desc - move Camellia to seperate - create CamelliaECB (it sucks, will fix it more after) * good fixes! * Rmv 16bfix (#14) * progress some progress was made. next commit will be working on Aria.java (its large so may take some time) * "invalid config" * Update Aria.java potential working! * bugfix * Sha224 fix (#15) * Update SHA224.java potential fix * Update pom.xml tested - works now! the entire fix was adding * 8L to the padding calculator thing xD * SHA384 is working LESGO! * Create SHA512.java * Sha512 impl (#16) * desc * Update SHA512.java * Update SHA512.java oookay a bit of opencode and a lot of time later its solved!
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package de.caydenno1.xacrypto.zekerrijndael.Global;
|
||||
|
||||
public class Galois {
|
||||
public static byte gm2(byte b) { return (byte)(((((b & 0xFF) << 1) & 0xFF) ^ (((b & 0xFF) & 0x80) != 0 ? 0x1b : 0))); }
|
||||
public static byte gm3(byte b) { return (byte)(gm2(b) ^ b); }
|
||||
public static byte gm9(byte b) { byte g2 = gm2(b); byte g4 = gm2(g2); return (byte)(gm2(g4) ^ b); }
|
||||
public static byte gm11(byte b) { byte g2 = gm2(b); byte g4 = gm2(g2); return (byte)(gm2(g4) ^ g2 ^ b); }
|
||||
public static byte gm13(byte b) { byte g2 = gm2(b); byte g4 = gm2(g2); return (byte)(gm2((byte) (g4 ^ b)) ^ b); }
|
||||
public static byte gm14(byte b) { byte g2 = gm2(b); byte g4 = gm2(g2); return (byte)(gm2((byte) (g4 ^ b)) ^ g2); }
|
||||
}
|
||||
Reference in New Issue
Block a user