Crypto algorithms

Optimization of Cryptographic Algorithms

Cryptographic algorithms are compute-intensive, and optimization of these can save very much time and energy, and thereby enable secure communication where that would otherwise not be feasible. The table below is not a comparison between different processors; instead it shows the speed-up obtained when important cryptographic algorithms, defined in C language, were optimized by microprogrogramming.

Test case

C code (µs)

Special opcodes (μs)

Factor

RSA Test Cases

1024 encrypt

121611

6554

18

1024 decrypt

5473623

400753

13

2048 encrypt

980828

71086

13

2048 decrypt

41020497

3077878

13

ARC4 Test Cases

ARC4-40 encrypt

1250

35

35

ARC4-40 decrypt

1250

35

35

ARC4-64 encrypt

1250

37

33

ARC4-64 decrypt

1250

37

33

ARC4-128 encrypt

2458

72

34

ARC4-128 decrypt

2458

72

34

DES Test Case

DES encrypt

3667

84

43

DES encrypt

3667

84

43

AES Test Cases

Key128 encrypt

553

47

12

Key128 decrypt

983

74

13

Key192 encrypt

635

74

11

Key192 decrypt

1128

88

12

Key256 encrypt

778

59

13

Key256 decrypt

1372

98

13

HASH Test Cases

MD5 7 test cases

2703

983

2.7

SHA1 4 test cases

5591

1925

2.9

SHA256 3 test cases

5059

1516

3.3