Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support more AF hashes algorithms #3

Closed
anatol opened this issue Jan 26, 2021 · 0 comments
Closed

Support more AF hashes algorithms #3

anatol opened this issue Jan 26, 2021 · 0 comments

Comments

@anatol
Copy link
Owner

anatol commented Jan 26, 2021

This is a followup for this question anatol/booster#17 (comment)

Here is a list of supported hashes in the cryptsetup sources (file lib/crypto_backend/crypto_kernel.c):

static struct hash_alg hash_algs[] = {
        { "sha1",      "sha1",        20,  64 },
        { "sha224",    "sha224",      28,  64 },
        { "sha256",    "sha256",      32,  64 },
        { "sha384",    "sha384",      48, 128 },
        { "sha512",    "sha512",      64, 128 },
        { "ripemd160", "rmd160",      20,  64 },
        { "whirlpool", "wp512",       64,  64 },
        { "sha3-224",  "sha3-224",    28, 144 },
        { "sha3-256",  "sha3-256",    32, 136 },
        { "sha3-384",  "sha3-384",    48, 104 },
        { "sha3-512",  "sha3-512",    64,  72 },
        { "stribog256","streebog256", 32,  64 },
        { "stribog512","streebog512", 64,  64 },
        { "sm3",       "sm3",         32,  64 },
        { NULL,        NULL,           0,   0 }
};

Add support for these hashes to luks.go

@anatol anatol closed this as completed in ef89cc6 Jan 26, 2021
anatol added a commit that referenced this issue Jan 26, 2021
sha1/sha256/sha3/ripemd160 are implemented by the standard golang
library and we add its support to luks.go

Some other algos (whirlpool, stribog256, stribog512, sm3) are not implement
by the standard library and we skip it for now. But we probably add its
support in the future with help of third-party implementations.

Closes #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant