Cryptoucan™ engraving customizations

Written by Dominik Joe Pantůček on 2019-02-14

cryptoucan

As we are successfully finishing casting our first batch of 28 Cryptoucans™ into epoxy and we are starting the molding process of the second batch of 112 Cryptoucans™, it is the time to allow our customers to customize the engraving on the back of the device. Read on to see how we implemented our own software for creating the engraving pictures.


Each and every Cryptoucan™ has its own unique serial number that is derived from its CPU id. As mentioned earlier[1], BLAKE2[2] hash function is used for this purpose. This serial number - encoded in slightly modified BASE32[3] - is the serial number that is shown on the device.

Reading the CPU id from Cryptoucan™ in software can be easily done when the device is in bootloader[4] mode. The good thing about bootloader in our CPU is that it uses USB[5] human interface device[6] (HID) protocol for communication. And there is a great cross-platform library called hidapi[7] that can be used for communicating with USB HID devices. And of course, we use this library exactly for this purpose.

We are using Racket[8] for virtually all of our internal software development and although there are nice bindings[9] for hidapi available as Racket package[10], they are slightly outdated and we had to create our own bindings to address it. With these bindings, we were available to quickly develop an application that continuously checks for connected Cryptoucan™ and when one is connected, it is kept in bootloader mode and its CPU id is read and serial number displayed and a picture is prepared for engraving as seen in Picture 1 below.

Picture 1: Cryptoucan™ engraving software The best thing about this application is - of course - it is multi-platform. We are using it on both Ubuntu[11] and Windows. Although - to be honest - Windows is not an operating system. Nothing works there as it should. Even the command-line is completely useless. However, we managed to get it working and the engraving results shown in Picture 2 below give a hint that this was the right choice.

Picture 2: My engraved Cryptoucan™ with serial number and customization  

That is all for today and be sure to check our blog next week to finally see a new Cryptoucan™ video!


References

  1. https://trustica.cz/en/2018/12/27/blake2-embedded-implementation/

  2. https://blake2.net/

  3. Wikipedia contributors. (2019, January 30). Base32. In Wikipedia, The Free Encyclopedia. Retrieved 23:31, February 13, 2019, from https://en.wikipedia.org/w/index.php?title=Base32&oldid=880955445

  4. Wikipedia contributors. (2019, February 13). Booting. In Wikipedia, The Free Encyclopedia. Retrieved 23:32, February 13, 2019, from https://en.wikipedia.org/w/index.php?title=Booting&oldid=883055952#BOOT-LOADER

  5. Wikipedia contributors. (2019, February 11). USB. In Wikipedia, The Free Encyclopedia. Retrieved 23:33, February 13, 2019, from https://en.wikipedia.org/w/index.php?title=USB&oldid=882776296

  6. Wikipedia contributors. (2018, December 7). Human interface device. In Wikipedia, The Free Encyclopedia. Retrieved 23:33, February 13, 2019, from https://en.wikipedia.org/w/index.php?title=Human_interface_device&oldid=872405144

  7. http://www.signal11.us/oss/hidapi/

  8. https://racket-lang.org/

  9. https://pkgs.racket-lang.org/package/hidapi

  10. https://pkgs.racket-lang.org/

  11. https://www.ubuntu.com/