Skip to content

boivie/skip32-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skip32-java

skip32-java is an implementation of SKIP32 cipher written in Java. SKIP32 is a 80-bit key, 32-bit block cipher based on Skipjack. The original implementation is written by Greg Rose and can be found at https://opensource.qualcomm.com/assets/dotc/skip32.c

The algorithm is useful for obfuscating 32-bit integers, such as database IDs, to make them look less sequential.

Usage

Either download and compile it yourself from source, or use this in your pom.xml:

<dependency>
  <groupId>com.boivie</groupId>
  <artifactId>skip32</artifactId>
  <version>1.0</version>
</dependency>

Your java code will look something like:

import com.boivie.skip32.Skip32

...

byte[] key = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, (byte) 0x88,
               (byte) 0x99, (byte) 0xAA };

int id = 12345;

int c = Skip32.encrypt(id, key);
int p = Skip32.decrypt(c, key);

Assert.assertEquals(id, p);

Author

This code is written (or well, mostly translated from the original source) by Victor Boivie, [email protected].

License

This code is distributed under the New BSD License. Please see the LICENSE file for full details.

About

32-bit block cipher based on Skipjack, written in Java

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages