7 # Execute `func` for each combination of cipher, sectorsize, and hmac algo
8 # `func` usage should be:
9 # func <cipher> <aalgo> <secsize>
10 for_each_geli_config() {
13 for cipher in aes-xts:128 aes-xts:256 \
14 aes-cbc:128 aes-cbc:192 aes-cbc:256 \
16 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 \
17 blowfish-cbc:224 blowfish-cbc:256 blowfish-cbc:288 \
18 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \
19 blowfish-cbc:416 blowfish-cbc:448 \
20 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do
23 for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 \
24 hmac/sha384 hmac/sha512; do
25 for secsize in 512 1024 2048 4096 8192; do
26 bytes=`expr $secsize \* $sectors + 512`b
27 md=$(attach_md -t malloc -s $bytes)
28 ${func} $cipher $aalgo $secsize
29 geli detach ${md} 2>/dev/null
30 mdconfig -d -u ${md} 2>/dev/null
36 # Execute `func` for each combination of cipher, and sectorsize, with no hmac
37 # `func` usage should be:
38 # func <cipher> <secsize>
39 for_each_geli_config_nointegrity() {
42 for cipher in aes-xts:128 aes-xts:256 \
43 aes-cbc:128 aes-cbc:192 aes-cbc:256 \
45 blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 \
46 blowfish-cbc:224 blowfish-cbc:256 blowfish-cbc:288 \
47 blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \
48 blowfish-cbc:416 blowfish-cbc:448 \
49 camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do
52 for secsize in 512 1024 2048 4096 8192; do
53 bytes=`expr $secsize \* $sectors + 512`b
54 md=$(attach_md -t malloc -s $bytes)
55 ${func} $cipher $secsize
56 geli detach ${md} 2>/dev/null
57 mdconfig -d -u ${md} 2>/dev/null
65 if [ -f "$TEST_MDS_FILE" ]; then
67 [ -c /dev/${md}.eli ] && \
68 geli detach $md.eli 2>/dev/null
69 mdconfig -d -u $md 2>/dev/null
72 rm -f "$TEST_MDS_FILE"
74 trap geli_test_cleanup ABRT EXIT INT TERM
76 . `dirname $0`/../geom_subr.sh