(Photo: pixabay.com)

# SHORTY

SHORTY is a complete public key algorithm, it is suitable for both encryption and digital signatures. The ciphertext is hardly larger than the plaintext and the modular multiplication used is much less computationally intensive than modular exponentiation as used in other algorithms.

... By Markus Fleschutz 🕓 April 12, 2000.

## Description

To prepare, divide the message into sub-blocks of fixed size nbits and choose the four values a, b, c and m so that holds:

• c and m must not have a common divisor (relatively prime)
• m must be greater than 2 ^ nBits
• a * b * c mod m must be 1

The values a and b form the private key, c and m the public key. The larger these values are chosen, the stronger the security. Then calculate the number sequence K as follows:

For i = 0, 1, 2, ... to nBits - 1 K[i] = (2 ^ i) * a mod m

For encryption set the ciphertext ("cipher") to 0.

For i = 0, 1, 2... to nBits - 1 If in the message the bit 2 ^ i is set, then: cipher = cipher + K[i]

cipher = cipher * b mod m

For decryption calculate:

Plaintext = cipher * c mod m

## Example

We divide the message into sub-blocks of 6 bits and choose a = 7, b = 2, c = 9 and m = 125.

The number sequence K is calculated from this as follows:

``````1 * 7 mod 1301 = 7
2 * 7 mod 1301 = 14
4 * 7 mod 1301 = 28
8 * 7 mod 1301 = 56
16 * 7 mod 1301 = 112
32 * 7 mod 1301 = 99
``````

Thus, the sequence of numbers K consists of: { 7, 14, 28, 56, 112, 99 }.

If the message is 010110, the encryption proceeds as follows:

010110 equals 14 + 28 + 112 = 154. The ciphertext is then: 154 * 2 mod 125 = 58

The decryption is done quite simply via:

58 * 9 mod 125 = 22, which corresponds to 10110

The recovered plaintext is then: 010110

## Derivation

SHORTY is derived from the knapsack algorithm of Merkle-Hellman [1], which is defined as follows:

1. choose a knapsack sequence with the superincreasing property.
2. choose a multiplier n and a modulus m with the following properties:

m > sum of all numbers in the knapsack sequence, n and m have no common divisors.

1. calculate the normal knapsack sequence from: superKnapsack[i] * n mod m
2. add for each set bit in the message the corresponding element in the normal knapsack sequence to the ciphertext

knapsack sequence to the ciphertext.

1. determine nn so that: n * nn = 1 (mod m)
2. calculate: ciphertext * nn mod m
3. gain the plaintext over the knapsack sequence with the superincreasing property.

For SHORTY, we take the power-of-two knapsack sequence (1, 2, 4, 8, 16, 32, ...) in step (1), which satisfies the superincreasing property, so step (7) can then be omitted.

Step (6) is split into two modular multiplications, since holds: ab * x mod m equals: (a * x mod m) * b mod m

nn is split into the 2 multipliers b and c, n corresponds to a in SHORTY.

## Example key

For 80 bits:

``````private a = 1b538a (24 bit)
private b = abd93 (20 bit)

public mod = dcffdb7769a382d02f69 (80 bit)
``````

For 96 bits:

``````private a = 1a4824 (24 bit)
private b = 219a9c (24 bit)

public mod = c3c694bcb70d5dcfb3d5f239 (96 bit)
``````

For 100 bit:

``````private a = 1fdb48 (24 bit)
private b = 2457c6 (24 bit)

public c = 181e0b1397d13baa66e861d0feae1734b418db2e1aa5efc74a3c1a2fe920dacc26adca8b1dd579bb2bc51ef204b778e8dd04d0f3f02ed8edb254582f8a99ecb26aab5a58c433a3332ca82f5c44f64a5265fb611d1fc0a3b200fdc21f42836ece72fb20060d03b30f9416cbc82f8fe9f4ea0fc15de1e8084d518a6b (984 bit)
public mod = 8ee82a56a73549610d9dbf8db (100 bit)
``````