Block-ciphers

Block ciphers

DES algorithm video - 1

DES algorithm video - 2

In order to understand hex and type parameters read Hash

In order to understand encryption and decryption read Stream

AES

spec

AES algorithm video - 1

AES algorithm video - 2

Description: Block cipher and AES winner.

Key:128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, Performance is impportant, FIPS 197, NIST.

RC6

spec

Description: Block cipher and AES finalist.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

MARS

spec

Description: Block cipher and AES finalist.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

Twofish

spec

Description: Block cipher and AES finalist.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

Serpent

spec

Description: Block cipher and AES finalist.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

CAST-256

spec

Description: Block cipher and AES finalist.

Key: 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

Camellia

spec

Description: Block cipher, The cipher has been approved for use by the ISO/IEC, the European Union's NESSIE project, the Japanese CRYPTREC.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

Speck128

spec

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: IoT

Simeck64

spec

Key: 128 bits.

Iv: 64 bits.

Uses: IoT

Modes of Operation

Modes of Operation video

CTR

spec

Description: Block cipher mode

Uses: Performance is important.

GCM

spec

Description: Block cipher mode

Uses: Authenticated encryption.

  • It only support "type":"string"

  • It doesn't support "algorithm":"SIMECK64"

How to ???

In this example we encrypt and decrypt Hello world! string using AES with the key and iv given in CTR mode.

On datajs["algorithm"] can be one of {AES, RC6, MARS, Twofish, SERPENT, CAST256, CAMELLIA, SPECK128, SIMECK64 }_

In this example we encrypt and decrypt Hello world! string using AES with the key,iv,adata given in GCM mode.

On datajs["algorithm"] can be one of {AES, RC6, MARS, Twofish, SERPENT, CAST256, CAMELLIA, SPECK128}_

Json to enc string (key and iv depends on algorithm you chose) in CTR mode

Json to dec string (key and iv depends on algorithm you chose) in CTR mode

  • To enc/dec a file you need to change "type":"string" -> "type":"file" , "plaintext": "your hex enc string " -> "file":"your file"

  • To use enc/dec GCM mode you need to change "mode":"ctr"->"mode":"gcm" , add "adata":"your string" and "hex" parameters

  • "hex" parameter apply for "string" and "adata" parameter

Last updated

Was this helpful?