Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (2) — Plan9 4th Edition

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mp(2)

blowfish(2)

des(2)

dsa(2)

elgamal(2)

rc4(2)

rsa(2)

sechash(2)

prime(2)

rand(2)

AES(2)

NAME

setupAESstate, aesCBCencrypt, aesCBCdecrypt - advanced encryption standard (rijndael)

SYNOPSIS

­#include <u.h>
­#include <libc.h>
­#include <mp.h>
­#include <libsec.h>

voidsetupAESstate(AESstate ∗s, uchar key[], int keybytes, uchar ∗ivec)

voidaesCBCencrypt(uchar∗, int, AESstate∗)

voidaesCBCdecrypt(uchar∗, int, AESstate∗)

DESCRIPTION

DES is being replaced by Rijndael, also known as AES, as the preferred block ciper.  setupAESstate, aesCBCencrypt, and ­aesCBCdecrypt implement cipher block chaining encryption.  ­Keybytes should be 16, 24, or 32.  The initialization vector ­ivec of ­AESbsize bytes should random enough to be unlikely to be reused but does not need to be cryptographically strongly unpredictable. 

SOURCE

­/sys/src/libsec

SEE ALSO

mp(2), blowfish(2), des(2), dsa(2), elgamal(2), rc4(2), rsa(2), sechash(2), prime(2), rand(2)

Plan 9  —  September 14, 2002

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026