mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-27 14:22:31 +02:00
Provide random KMK example instead of fixed testing123
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
This commit is contained in:
parent
c7042472e8
commit
bddbd31a15
12
README
12
README
@ -82,6 +82,16 @@ or
|
||||
$ scp x509_evm.pem target:/etc/keys
|
||||
|
||||
|
||||
Generation of EVM keys
|
||||
|
||||
$ # create and save the kernel master key (user type)
|
||||
$ keyctl add user kmk "`dd if=/dev/urandom bs=1 count=32 2>/dev/null`" @u
|
||||
$ keyctl pipe `keyctl search @u user kmk` > /etc/keys/kmk
|
||||
$ # create the EVM encrypted key
|
||||
$ keyctl add encrypted evm-key "new user:kmk 32" @u
|
||||
$ keyctl pipe `keyctl search @u encrypted evm-key` >/etc/keys/evm-key
|
||||
|
||||
|
||||
Initialization
|
||||
--------------
|
||||
|
||||
@ -92,7 +102,7 @@ Here is an example script /etc/initramfs-tools/scripts/local-top/ima.sh
|
||||
|
||||
# import EVM HMAC key
|
||||
keyctl clear @u
|
||||
keyctl add user kmk "testing123" @u
|
||||
cat /etc/keys/kmk | keyctl padd user kmk @u
|
||||
keyctl add encrypted evm-key "load `cat /etc/keys/evm-key`" @u
|
||||
|
||||
# import IMA public key
|
||||
|
Loading…
x
Reference in New Issue
Block a user