From 1e18045a38be3f08213b465fa2e80d11abae62df Mon Sep 17 00:00:00 2001 From: redlineo Date: Tue, 21 Jan 2025 17:40:40 +0000 Subject: [PATCH] update readme --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6221d96..287b939 100644 --- a/README.md +++ b/README.md @@ -66,12 +66,24 @@ Choose `GOST Encrypt`, then choose type `GOST R 34.12 (Kuznechik, 2015)`, not `M 94208510C2C001FB01C0C21085209401 ``` -6. Add your encrypted passwords in **keymap.c**. Now you can encrypt 2 passwords with length <=16 byte. Keep this information in secret. Even if there are no plaintext. +6. Add your encrypted passwords in **keymap.c**. Now you can encrypt 4 passwords with any length (16, 32, 64, more not tested). Keep this information in secret. Even if there are no plaintext. ```c -const uint8_t encrypted_passwords[2][16] = { {0,0,0,...,0,0,0}, {0,0,0,...,0,0,0} }; +const uint8_t encrypted_passwords[STORAGE_SIZE][STORAGE_PASS_LEN] = { + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, + }; ``` +If you want more passwords in storage, you should: +- add keys `RED_PASSX` into `enum red_crypto_keys` in `red_crypto.h` +- add into `crypto_proccess_record_user` handling new keys +- add into `uint8_t dec_pass[STORAGE_SIZE][STORAGE_PASS_LEN]` additional data. There are must be same size as `encrypted_passwords`. + +> I know, that's inconvenient. I'm sorry, trying to do something with it. + 7. Add new layer or set new keyes everywhere you want. - `RED_TEST` - execute test functions of every algorithm with. Available only with `#define TEST_FUNCTIONS_ENABLED` and `COMMAND_ENABLE=yes`. You can see output via `hid_listen`. @@ -104,4 +116,4 @@ If you have missed while entering password, just tap `RED_CRY_M` and tap `RED_CR Thanks to the authors of these repositories: - https://github.com/mjosaarinen/kuznechik - kuznechik implementation for 8bit and 128bit -- https://github.com/B-Con/crypto-algorithms - other crypto algorithms \ No newline at end of file +- https://github.com/B-Con/crypto-algorithms - other crypto algorithms