AVR-Crypto-Lib/en

Aus LaborWiki

Wechseln zu: Navigation, Suche

Eine deutsche Version dieses Artikels ist unter AVR-Crypto-Lib verfügbar.

Inhaltsverzeichnis

[Bearbeiten] Where can I find it?

[Bearbeiten] new repository

BZR: [1] Use

 bzr co http://avrcryptolib.das-labor.org/bzr .

to get a copy in your current directory

There is also a nightly build tar ball available at [2]

Some Docu will be collected at a new wiki dedicated to this project: [3]


[Bearbeiten] old repository

SVN: [4]

via Trac (also svn, but suitable for direct browsing):[5]

[Bearbeiten] Short Facts

  • small implementation of cryptographic algorithms in C (quite portable)
  • even smaller implementations in assembly language (ATmega, gnu-avr-as)
  • allfunctions are reentrant (except functions of the PRNG "Entopium")
  • license: GPLv3 (nearly everything) (for different licensing contact the author)

[Bearbeiten] About

Crypto-avr-lib is a set of implementations of different cryptographic primitives. Due to the special limitations of microcontrollers (very little space, RAM and flash are ranging from a few bytes to a few KiB) reference or "normal" optimised implementations are not usable. Therefore we try to provide special implementations which respect the extreme limited resources of microcontroller applications.

[Bearbeiten] What should be done

[Bearbeiten] symmetric

block blowfish cast6 twofish idea kasumi
stream seal A5/1 Turing Rabbit
hashes ripemd whirlpool

[Bearbeiten] What we have

[Bearbeiten] blockciphers

  • AES
  • XTEA
  • CAST5
  • Camellia
  • Skipjack
  • Noekeon
  • RC5
  • RC6
  • SEED
  • DES
  • TDES (aka EDE-DES, 3DES)
  • SHABEA
  • Serpent
  • Present

[Bearbeiten] streamciphers

  • ARCFOUR (RC4 compatible)
  • Trivium
  • Grain
  • MUGI

[Bearbeiten] hashes

  • Blake
  • BlueMidnightWish
  • Grøstl
  • MD5
  • SHA-256
  • SHA-1
  • SHABAL
  • Skein
  • Twister

[Bearbeiten] others

[Bearbeiten] Facts

[Bearbeiten] Blockchiphers

Name Variant Language Size (Flash) (Bytes) Size (Context) (Bytes) Size (Stack) (Bytes) Keysize (Bits) Blockize (Bits) Cycles (Initialisation) Cycles (Encryption) Cycles (Decryption) Nessie test Attacs Paper License / Patents
AES 128 C 2668176 128128 4632 21279 39340 ok
AES 192 C 2668208 192128 5082 25724 47799 ok
AES 256 C 2668240 256128 6161 30174 56253 ok
AES 128 Asm 2070176 128128 2039 2555 6764 unconfirmed
AES 192 Asm 2070208 128128 2267 3039 8164 unconfirmed
AES 256 Asm 2070240 128128 2852 3521 9562 unconfirmed
AES 128-fastdecAsm 2580176 128128 2039 2555 3193 unconfirmed
AES 192-fastdecAsm 2580208 128128 2267 3039 3819 unconfirmed
AES 256-fastdecAsm 2580240 128128 2852 3521 4443 unconfirmed
CamelliaC C 8694 32 128128 10190 43200 44066 unconfirmed
CamelliaC+AsmC+Asm 4088 32 128128 11115 10185 10217 unconfirmed
Cast5 C C 1431275 0 – 12864 137421255013109 unconfirmed
RC5 RC5-32/r/bC16503+(8*#rounds+1) 1 – 2040 79352 7827 7223 unconfirmed US-Patent 5,724,428 expires: 03/03/2015
RC6RC6-32/r/bC278019+(8*#rounds) 1 – 2040128 1399402660025986 unconfirmed
NoekeonCC16160 (16) 128128 260372579826396 unconfirmed
NoekeonAsmAsm7740 (16) 128128 104161019110745 unconfirmed
DESCC26420 5664 284952284977 unconfirmed
TDESCC26420 16864852082852107 unconfirmed
SerpentNon-bitsliceC3064528 1 – 256128537021492884493004 unconfirmed
SerpentNon-bitslice, smallAsm1290528 1 – 256128114844105771105871 unconfirmed
SerpentNon-bitslice, fast Asm1400528 1 – 256128110582101648101743 unconfirmed
SerpentbitsliceC4482528 1 – 2561281020987082770462 unconfirmed
SkipjackCC11440 80643810938450 unconfirmed
PresentCC1514256 806430395105796151624 unconfirmed
SEEDCC 372616 128128 18156906 56427 unconfirmed
SEEDAsmAsm165616 1281281811140111394 unconfirmed
XTEACC8200 1286499129789 unconfirmed
XTEAAsmAsm5040 1286476877688 unconfirmed
ShabeaCC198800 – infinit256 unconfirmed
Threefish-256AsmAsm506864 256256 3754093640912 unconfirmed
Threefish-512AsmAsm506896 512512 5479302093240 unconfirmed
Threefish-1024AsmAsm5068160 10241024 892220606218694 unconfirmed
Threefish-256 C C 1975264 256256 806229592223251 unconfirmed
Threefish-512 C C 1975296 512512 1299453625440279 unconfirmed
Threefish-1024 C C 19752160 10241024 226710330561010445 unconfirmed
Name Variant Language Size (Flash) (Bytes) Size (Context) (Bytes) Size (Stack) (Bytes) Keysize (Bits) Blockize (Bits) Cycles (Initialisation) Cycles (Encryption) Cycles (Decryption) Nessie test Attacs Paper License / Patents


[Bearbeiten] Streamciphers

Name Variant Language Size (Flash) (Bytes) Size (Context) (Bytes) Size (Stack) (Bytes) Keysize (Bits) Output size (Bits) Cycles (Initialisation) Cycles (Generation) Attacs Paper License / Patents
ARCFOURC C 230258 8 – 20408 64086 56
ARCFOURAsmAsm112258 8 – 20408 6689 42
TriviumC C 424 36 801 775726 665
Grain C C 778 20 801 107366 617
MUGI C C 3500152 128641138864105


[Bearbeiten] Hashes

Name Variant Language Size (Flash) (Bytes) Size (Context) (Bytes) Size (Stack) (Bytes) Hashsize (Bits) Blockize (Bits) Cycles (Initialisation) Cycles (per block) Cycles (per byte) Cycles (Finalisation) Attacs Paper License / Patents
Blake-28 C C 3508 53 192 224 512 343 71340 1114.69 71907
Blake-32 C C 6684 53 192 256 512 344 71340 1114.69 71975
Blake-48 C C 3508 101 376 384 1024 884 510637 3989.35 518644
Blake-64 C C 6684 101 376 512 1024 885 510637 3989.35 521119
BlueMidnightWish-224 size C 4618 68 289 224 512 404 110090 1720.16 221789
BlueMidnightWish-224 C C 6721 68 470 224 512 404 88759 1386.86 179103
BlueMidnightWish-224 split asm 1566 68 246 224 512 513 52925 826.95 106526
BlueMidnightWish-224 tiny asm 1622 68 246 224 512 509 52925 826.95 106532
BlueMidnightWish-224 asm asm 3274 68 250 224 512 229 31421 490.95 63422
BlueMidnightWish-256 size C 4618 68 289 256 512 404 110090 1720.16 221810
BlueMidnightWish-256 C C 6721 68 470 256 512 404 88759 1386.86 179131
BlueMidnightWish-256 split asm 1566 68 246 256 512 509 52925 826.95 106554
BlueMidnightWish-256 tiny asm 1622 68 246 256 512 515 52925 826.95 106551
BlueMidnightWish-256 asm asm 3274 68 250 256 512 231 31421 490.95 63455
BlueMidnightWish-384 C C 17729 132 914 384 1024 2004 382079 2984.99 767017
BlueMidnightWish-512 C C 17729 132 914 512 1024 2005 382079 2984.99 767125
CubeHash-224 C C 1528 130 61 224 256 1860487 186473 5827.28 2047589
CubeHash-256 C C 1528 130 61 256 256 1860487 186473 5827.28 2047625
CubeHash-384 C C 1528 130 61 384 256 1860487 186473 5827.28 2047749
CubeHash-512 C C 1528 130 61 512 256 1860487 186473 5827.28 2047881
ECHO-224 C C 4324 90 585 224 1536 450 222446 1158.57 223610
ECHO-256 C C 4324 90 585 256 1536 454 222446 1158.57 223635
ECHO-384 C C 4324 154 521 384 1024 841 275324 2150.97 276329
ECHO-512 C C 4324 154 521 512 1024 828 275324 2150.97 276441
Groestl-224 C C 2234 68 250 224 512 323 522120 8158.12 783256
Groestl-256 C C 2234 68 250 256 512 323 522120 8158.12 783289
Groestl-384 C C 2330 132 450 384 1024 662 1459656 11403.56 2189646
Groestl-512 C C 2330 132 450 512 1024 661 1459656 11403.56 2189774
Keccak-224 C C 3705 206 455 224 1152 1049 1307229 9077.98 1308404
Keccak-256 C C 3705 206 447 256 1088 1049 1307141 9611.33 1308305
Keccak-384 C C 3705 206 415 384 832 1049 1306789 12565.28 1307891
Keccak-512 C C 3705 206 383 512 576 1049 1306437 18144.96 1307482
MD5 C C 2506 20 172 128 512 32 42642 666.28 43057
MD5 asm asm 1686 20 117 128 512 32 18258 285.28 18556
SHA-1 C C 2526 28 225 160 512 52 75766 1183.84 76762
SHA-1 asm asm 1022 28 170 160 512 181 37030 578.59 37275
SHA-256 C C 3240 40 405 256 512 225 177455 2772.73 181789
SHA-256 asm asm 1598 40 376 256 512 298 50125 783.20 50479
Shabal-192 C C 2312 188 106 192 512 1549 59423 928.48 231621
Shabal-192 asm asm 1580 188 90 192 512 1047 13689 213.89 50762
Shabal-224 C C 2312 188 106 224 512 1549 59423 928.48 231650
Shabal-224 asm asm 1580 188 90 224 512 1047 13689 213.89 50793
Shabal-256 C C 2312 188 106 256 512 1549 59423 928.48 231699
Shabal-256 asm asm 1580 188 90 256 512 1047 13689 213.89 50825
Shabal-384 C C 2312 188 106 384 512 1549 59423 928.48 231824
Shabal-384 asm asm 1580 188 90 384 512 1047 13689 213.89 50930
Shabal-512 C C 2312 188 106 512 512 1549 59423 928.48 231952
Shabal-512 asm asm 1578 188 90 512 512 1047 13689 213.89 51050
Skein-1024-1024 C C 7130 146 643 1024 1024 1124414 1122133 8766.66 2245416
Skein-1024-1024 asm asm 2486 146 487 1024 1024 222141 220067 1719.27 441455
Skein-1024-128 C C 7130 146 643 128 1024 1124414 1122133 8766.66 2244520
Skein-1024-128 asm asm 2486 146 487 128 1024 222141 220067 1719.27 440669
Skein-1024-160 C C 7130 146 643 160 1024 1124414 1122133 8766.66 2244552
Skein-1024-160 asm asm 2486 146 487 160 1024 222141 220067 1719.27 440697
Skein-1024-224 C C 7130 146 643 224 1024 1124414 1122133 8766.66 2244616
Skein-1024-224 asm asm 2486 146 487 224 1024 222141 220067 1719.27 440753
Skein-1024-256 C C 7130 146 643 256 1024 1124414 1122133 8766.66 2244648
Skein-1024-256 asm asm 2486 146 487 256 1024 222141 220067 1719.27 440781
Skein-1024-384 C C 7130 146 643 384 1024 1124414 1122133 8766.66 2244776
Skein-1024-384 asm asm 2486 146 487 384 1024 222141 220067 1719.27 440893
Skein-1024-512 C C 7130 146 643 512 1024 1124414 1122133 8766.66 2244904
Skein-1024-512 asm asm 2486 146 487 512 1024 222141 220067 1719.27 441005
Skein-256-128 C C 4986 50 281 128 256 233990 232285 7258.91 465291
Skein-256-128 asm asm 2052 50 194 128 256 39911 38606 1206.44 77830
Skein-256-160 C C 4986 50 281 160 256 233990 232285 7258.91 465323
Skein-256-160 asm asm 2052 50 194 160 256 39911 38606 1206.44 77858
Skein-256-224 C C 4986 50 281 224 256 233990 232285 7258.91 465387
Skein-256-224 asm asm 2052 50 194 224 256 39911 38606 1206.44 77914
Skein-256-256 C C 4986 50 281 256 256 233990 232285 7258.91 465419
Skein-256-256 asm asm 2052 50 194 256 256 39911 38606 1206.44 77944
Skein-256-384 C C 4986 50 281 384 256 233990 232285 7258.91 698164
Skein-256-384 asm asm 2052 50 194 384 256 39911 38606 1206.44 116992
Skein-256-512 C C 4986 50 281 512 256 233990 232285 7258.91 698292
Skein-256-512 asm asm 2052 50 194 512 256 39911 38606 1206.44 117103
Skein-512-1024 C C 5466 82 399 1024 512 487951 486054 7594.59 1460518
Skein-512-1024 asm asm 2154 82 291 1024 512 93984 92429 1444.20 279124
Skein-512-128 C C 5466 82 399 128 512 487951 486054 7594.59 972682
Skein-512-128 asm asm 2154 82 291 128 512 93984 92429 1444.20 185447
Skein-512-160 C C 5466 82 399 160 512 487951 486054 7594.59 972714
Skein-512-160 asm asm 2154 82 291 160 512 93984 92429 1444.20 185475
Skein-512-224 C C 5466 82 399 224 512 487951 486054 7594.59 972778
Skein-512-224 asm asm 2154 82 291 224 512 93984 92429 1444.20 185531
Skein-512-256 C C 5466 82 399 256 512 487951 486054 7594.59 972810
Skein-512-256 asm asm 2154 82 291 256 512 93984 92429 1444.20 185559
Skein-512-384 C C 5466 82 399 384 512 487951 486054 7594.59 972938
Skein-512-384 asm asm 2154 82 291 384 512 93984 92429 1444.20 185671
Skein-512-512 C C 5466 82 399 512 512 487951 486054 7594.59 973066
Skein-512-512 asm asm 2154 82 291 512 512 93984 92429 1444.20 185785
Twister-224 C C 3248 80 250 224 512 398 240983 3765.36 509259
Twister-224 asm asm 1614 80 2566 224 512 517 164208 2565.75 347203
Twister-256 C C 3248 80 250 256 512 398 240983 3765.36 509395
Twister-256 asm asm 1614 80 228 256 512 398 164208 2565.75 347264
Twister-384 C C 3822 144 252 384 512 715 269537 4211.52 860078
Twister-384 asm asm 2156 144 228 384 512 722 183008 2859.50 585820
Twister-512 C C 3822 144 252 512 512 715 269537 4211.52 967704
Twister-512 asm asm 2156 144 228 512 512 723 183008 2859.50 659311


[Bearbeiten] MACs

Name Variant Language Size (Flash) (Bytes) Size (Context) (Bytes) Size (Stack) (Bytes) Keysize (Bits) Blockize (Bits) Cycles (Initialisation) Cycles (per block) Cycles (Finalisation) Attacs Paper License / Patents
HMAC-SHA256 C2712 (incl. SHA256)40 beliebig 512
HMAC-SHA1 C2182 (incl. SHA1)28 beliebig 512
OMAC-Noekeon Asm1184 (incl. Noekeon)16 128 128 95 10533 21474
OMAC-Noekeon C1284 (incl. Noekeon)16 128 128 95 10589 21741


[Bearbeiten] PRNGs

Name Variant Language Size (Flash) (Bytes) Size (Context) (Bytes) Size (Stack) (Bytes) Blockize (Bits) Cycles (Input) Cycles (Output) Attacs Paper License / Patents
Entropium C217464 256
Persönliche Werkzeuge