Block-ciphers

Block ciphers

DES algorithm video - 1arrow-up-right

DES algorithm video - 2arrow-up-right

In order to understand hex and type parameters read Hasharrow-up-right

In order to understand encryption and decryption read Streamarrow-up-right

AES

specarrow-up-right

AES algorithm video - 1arrow-up-right

AES algorithm video - 2arrow-up-right

Description: Block cipher and AES winner.

Key:128, 192, 256 bits.

Iv: 128 bits.

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

RC6

specarrow-up-right

Description: Block cipher and AES finalist.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

MARS

specarrow-up-right

Description: Block cipher and AES finalist.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

Twofish

specarrow-up-right

Description: Block cipher and AES finalist.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

Serpent

specarrow-up-right

Description: Block cipher and AES finalist.

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

CAST-256

specarrow-up-right

Description: Block cipher and AES finalist.

Key: 256 bits.

Iv: 128 bits.

Uses: General propuse, alternative to AES.

Camellia

specarrow-up-right

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

specarrow-up-right

Key: 128, 192, 256 bits.

Iv: 128 bits.

Uses: IoT

Simeck64

specarrow-up-right

Key: 128 bits.

Iv: 64 bits.

Uses: IoT

Modes of Operation

Modes of Operation videoarrow-up-right

CTR

specarrow-up-right

Description: Block cipher mode

Uses: Performance is important.

GCM

specarrow-up-right

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