[duplicate] Midbar (Teensy 4.1 Version) V2.0

Status
Not open for further replies.

Northstrix

Member
Hello, everyone.
Let me announce that the Midbar (Teensy 4.1 Version) V2.0 is out.
That version of Midbar combines in it the password vault, credit card vault, phone number vault, note vault, data encryptor/decryptor, and data hasher.

Aside from the fact that this is the first version of Midbar that can function as a USB keyboard, it also comes with lots of convenient features, such as:

  • USB keyboard support - Allows you to interact with Midbar using the USB keyboard connected to the Teensy 4.1 USB port;
  • RFID-lockable (four RFID cards + master password to be exact) - This version of Midbar is locked with a combination of four RFID cards and a master password (Not a new feature for the Midbar project itself, but kinda new for the Teensy version of Midbar);
  • Combination of EEPROM and SD card storage - Enables you to store 16 login credentials in Teensy's EEPROM and allows you to store as many records on an SD card as there's available space on it (as long as you adjust the value in the "#define MAX_NUM_OF_RECS 999" line of course);
  • Ease of data backup - Allows you to effortlessly back up EEPROM data to the SD card or Serial Terminal and restore it just as easily;
  • Sophisticated encryption with integrity verification - Midbar utilizes a 3DES + AES + Blowfish + Serpent Encryption Algorithm in the cipher block chaining mode of operation combined with the HMAC-SHA256 to encrypt your data and check its integrity;
  • EEPROM integrity verification - The Midbar checks if the EEPROM is tampered with each time you unlock it;

Midbar (Teensy 4.1 Version) V2.0 can be used without the SD card. Although without the SD card, you would only have 16 slots available for your login credentials, you can still use it as a data encryptor/decryptor and data hasher;
And let's not forget that this version of Midbar allows you to encrypt an arbitrary string with a length of up to 10 000 characters using the 3DES + AES + Blowfish + Serpent Encryption Algorithm in the cipher block chaining mode of operation combined with the HMAC-SHA256 without any problems.

If you're interested in the Midbar (Teensy 4.1 Version) V2.0, you can find the tutorials for it on:
Instructables: https://www.instructables.com/Midbar-Teensy-41-Version-V20/
Hackster: https://www.hackster.io/northstrix/midbar-teensy-4-1-version-v2-0-344682
Medium: https://medium.com/@Northstrix/midbar-teensy-4-1-version-v2-0-f5e17c241894

As for the firmware, the links are in the tutorials. But for the sake of convenience, I paste the part with the links here:

You can download the firmware for Midbar from one of these sources.
SourceForge: https://sourceforge.net/projects/midbar/
GitHub: https://github.com/Northstrix/Midbar
If you just need the firmware for the device alongside the RNG, then I would advise you to download a 0.2 MB archive from SourceForge.
But if you need the firmware for all versions of Midbar alongside the extra code, photos, and diagrams, in that case, I would advise you to download the 199 MB archive from GitHub.

I hope you find this device handy.
Best regards,
Maxim Bortnikov
 

Attachments

  • IMG_20230719_184125.jpg
    IMG_20230719_184125.jpg
    312.7 KB · Views: 56
  • IMG_20230719_184125.jpg
    IMG_20230719_184125.jpg
    155.9 KB · Views: 59
  • EEPROM Partitioning Table.jpg
    EEPROM Partitioning Table.jpg
    130.6 KB · Views: 67
  • IMG_20230719_103927.jpg
    IMG_20230719_103927.jpg
    134.6 KB · Views: 53
  • IMG_20230719_144506.jpg
    IMG_20230719_144506.jpg
    137.2 KB · Views: 59
  • IMG_20230719_144625.jpg
    IMG_20230719_144625.jpg
    181.3 KB · Views: 53
  • IMG_20230719_145115.jpg
    IMG_20230719_145115.jpg
    156.1 KB · Views: 49
  • IMG_20230719_145241.jpg
    IMG_20230719_145241.jpg
    121.2 KB · Views: 49
  • rec_from_sd_in_ser.png
    rec_from_sd_in_ser.png
    29.5 KB · Views: 49
  • typed_from_EEPROM.png
    typed_from_EEPROM.png
    7.9 KB · Views: 53
Cool - Keyboard added!
Updated my github copy but never built it yet, not sure how large it is? But the remainder of the program flash could be a LittleFS drive that might hold more data than the EEPROM? And of course the T_4.1 can add a good sized QSPI flash that LittleFS can present as a file system as well.

Still reading the Instructable - but notice the Adafruit ILI9341display library still in use. Not that this is graphics intense and library performance matters - it is just interesting that it was noted to not work for some reason.

Wow - 6 of the Mifare RC522 units are only $14 - and includes 6 cards and 6 keyfobs and jumper wires.
Question: Are the cards written to, or just read for ID? They keyfobs are read only. The Instructable says 'RFID Reader' - wasn't sure if anything was written to the card.

This under View for SD Card: " Note that this feature isn't available for the data stored in the EEPROM."
> EEPROM shows a View option, but not Edit in the screen shots?
Is that comment misplaced?

Interesting project and quite involved, good work. Put parts in AMZN cart - just might build it to see.

Would be nice to have a way to use alternate key(s) for one or more encryption algorithms to put in plain text and get cipher to share with a friend using the same alternate key, and get cipher text to decrypt.
> maybe that is the multi version ruled out?
 
The archive that you download from GitHub weighs 199 MB.

As for using the part of the flash area designated for a program to store the user data, I prefer not to go into that depth, because it's much easier to use an external SD card or, as you've mentioned, just solder an additional QSPI chip. Or at the very least, use the EEPROM.

When it comes to the ILI9341 display library from Adafruit - I know that it's definitely not the fastest one, but it's the most stable and compatible library that I ever worked with.
And that's the only library out of all I've tried that actually works for the Teensy version of Midbar.
Some versions of Midbar though, like, https://www.instructables.com/Midbar-V40/, https://www.instructables.com/Midbar-V50/, or https://www.instructables.com/Midbar-STM32F401CCU6-Arduino-Uno-Version/ use a faster TFT_eSPI library.

"Question: Are the cards written to, or just read for ID?" - Midbar doesn't write anything on the RFID cards, it only reads their ID.

"This under View for SD Card: " Note that this feature isn't available for the data stored in the EEPROM."
> EEPROM shows a View option, but not Edit in the screen shots?
Is that comment misplaced?
" - Let me clarify that, there's no mistake.
The edit feature is unavailable for the data stored in the EEPROM (only Add, View, Delete, Type, and of course rewrite the record in the slot).
The view feature works for all data regardless of where it's stored.
But you can't print the content of a record stored in the EEPROM to the Serial Terminal, that's why I wrote "Note that this feature isn't available for the data stored in the EEPROM." in point N7 of step N21.

"Would be nice to have a way to use alternate key(s) for one or more encryption algorithms to put in plain text and get cipher to share with a friend using the same alternate key, and get cipher text to decrypt.
> maybe that is the multi version ruled out?
" - I've tried that, didn't really work out well: the implementations of the HMAC-SHA256, Blowfish, and Serpent that I work with don't take it lightly when I try to mess with the key too much, not to mention that the HMAC-SHA256 key has a variable length (or maybe I simply didn't put enough effort into that and gave up too early). I understand that it would be a very good feature to have, and if I'd ever have enough will, time, and resources to turn Midbar into a start-up, I would definitely strive to resolve these issues.
 
By the way, I forgot to mention I've also included firmware for this version of Midbar without the RFID capabilities.
You can find it in the "Teensy 4.1 Version/V2.0/extra/Firmware_no_rfid_with_EEPROM_with_type" folder
(https://github.com/Northstrix/Midbar/tree/main/Teensy%204.1%20Version/V2.0/extra/Firmware_no_rfid_with_EEPROM_with_type)
or in the "Extra Code" archive on SorceForge (https://sourceforge.net/projects/midbar/files/Teensy%204.1%20Version/V2.0/).
The random number (key) generator for that firmware is in the "RNG for firmware without rfid" folder.
 
Get familiar with Midbar without assembling it

If you want to get familiar with the Midbar project without assembling it, you can play with its simulation on Wokwi (https://wokwi.com/projects/374498956604379137).
Note that the Wokwi edition of Midbar doesn't include such features as RFID-lockability, USB keyboard support, and Teensy's well-functioning random number generator.
The simulation is also slow and a bit inconvenient to work with, but still, it should give you a feeling of what the Midbar is.
 

Attachments

  • Midbar (Wokwi Edition).jpg
    Midbar (Wokwi Edition).jpg
    74.1 KB · Views: 50
Status
Not open for further replies.
Back
Top