Compare commits

...
4 Commits
Author SHA1 Message Date
schauausgmbh 547e7c041b remove unneeded backup file 2026-10-07 22:50:19 +02:00
schauausgmbh c7f0640257 update README.md 2026-10-07 22:48:07 +02:00
schauausgmbh 216cdc56a7 code cleanup 2026-10-07 22:47:32 +02:00
schauausgmbh c0b7ec194b updated keyboard layout 2026-10-07 22:45:01 +02:00
11 changed files with 6419 additions and 7739 deletions

No files matched your search

+32 -2
View File
@@ -1,4 +1,6 @@
/*
* AES256 Seed Phrase Encryptor
*
* Copyright (C) 2026 SCHAUAUS GmbH
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,8 +25,8 @@
// compiler values definition
#define PRINT_SERIAL 1
#define DEBUG 0
#define USE_DISPLAY 1
#define HAS_KEYBOARD 0
#define USE_DISPLAY 0
#define HAS_KEYBOARD 1
#define BTN_HOME 9
@@ -36,7 +38,13 @@
#include <string.h>
// project files to include
#if USE_DISPLAY
#include "display.h"
#endif
#if HAS_KEYBOARD
#include "matrix_keyboard.h"
#endif
//creating an object of AES256 class
AES256_ESP aes256;
@@ -228,7 +236,10 @@ void encryptData (String data) {
#if PRINT_SERIAL
Serial.println();
#endif
#if USE_DISPLAY
display_crypt_block(fullString, BTN_HOME);
#endif
}
void clearCryptograficInformation () {
@@ -242,7 +253,9 @@ void clearCryptograficInformation () {
Serial.println("Memory cleared");
#endif
#if USE_DISPLAY
display_home();
#endif
}
void restartDevice () {
@@ -299,7 +312,20 @@ void setup() {
Serial.begin(115200);
while(!Serial);
pinMode(BTN_HOME, INPUT);
#if USE_DISPLAY
display_setup();
#endif
#if HAS_KEYBOARD
initKeyboard();
#endif
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
digitalWrite(4, 0);
digitalWrite(5, 0);
pinMode(4, INPUT_PULLDOWN);
Serial.println("Waiting for command");
#if PRINT_SERIAL
Serial.println("send \"help\" for available commands");
@@ -309,4 +335,8 @@ void setup() {
void loop() {
readCmd();
readHome(); // check for Home-button being pressed
#if HAS_KEYBOARD
char keyRead = readKeyboard();
if(keyRead != '\0') Serial.print("Keyboard input: " + keyRead + '\0');
#endif
}
+5726 -6354
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -5,7 +5,7 @@
"auto_track_width": true,
"hidden_netclasses": [],
"hidden_nets": [],
"high_contrast_mode": 1,
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
"images": 0.6,
+549 -949
View File
File diff suppressed because it is too large. Load diff
-403
View File
@@ -1,403 +0,0 @@
(kicad_symbol_lib
(version 20251024)
(generator "kicad_symbol_editor")
(generator_version "10.0")
(symbol "ESP32-C6-LCD-1.47"
(exclude_from_sim no)
(in_bom yes)
(on_board yes)
(in_pos_files yes)
(duplicate_pin_numbers_are_jumpers no)
(property "Reference" "U"
(at 0 15.494 0)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Value" "ESP32-C6-LCD-1.47"
(at 0 13.208 0)
(show_name no)
(do_not_autoplace no)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Footprint" ""
(at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Datasheet" "https://docs.waveshare.com/ESP32-C6-LCD-1.47"
(at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects
(font
(size 1.27 1.27)
)
)
)
(property "Description" "Development board featuring a ESP32-C6 microcontroller and a 1.47 inch LCD display"
(at 0 0 0)
(show_name no)
(do_not_autoplace no)
(hide yes)
(effects
(font
(size 1.27 1.27)
)
)
)
(symbol "ESP32-C6-LCD-1.47_1_1"
(rectangle
(start -10.1 12)
(end 10.1 -12)
(stroke
(width 0)
(type solid)
)
(fill
(type background)
)
)
(pin input line
(at -12.7 10.16 0)
(length 2.54)
(name "5V"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "1"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 7.62 0)
(length 2.54)
(name "GND"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "2"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 5.08 0)
(length 2.54)
(name "3V3"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "3"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 2.54 0)
(length 2.54)
(name "GP0"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "4"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 0 0)
(length 2.54)
(name "GP1"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "5"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 -2.54 0)
(length 2.54)
(name "GP2"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "6"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 -5.08 0)
(length 2.54)
(name "GP3"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "7"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 -7.62 0)
(length 2.54)
(name "GP4"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "8"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at -12.7 -10.16 0)
(length 2.54)
(name "GP5"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "9"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 -10.16 180)
(length 2.54)
(name "GP9"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "10"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 -7.62 180)
(length 2.54)
(name "GP18"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "11"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 -5.08 180)
(length 2.54)
(name "GP19"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "12"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 -2.54 180)
(length 2.54)
(name "GP20"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "13"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 0 180)
(length 2.54)
(name "GP23"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "14"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 2.54 180)
(length 2.54)
(name "GP12"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "15"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 5.08 180)
(length 2.54)
(name "GP13"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "16"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 7.62 180)
(length 2.54)
(name "RXD"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "17"
(effects
(font
(size 1.27 1.27)
)
)
)
)
(pin input line
(at 12.7 10.16 180)
(length 2.54)
(name "TXD"
(effects
(font
(size 1.27 1.27)
)
)
)
(number "18"
(effects
(font
(size 1.27 1.27)
)
)
)
)
)
(embedded_fonts no)
)
)
+2 -2
View File
@@ -328,7 +328,7 @@
(pin input line
(at 15.24 2.54 180)
(length 2.54)
(name "GP12"
(name "GP12_USB_D-"
(effects
(font
(size 1.27 1.27)
@@ -346,7 +346,7 @@
(pin input line
(at 15.24 5.08 180)
(length 2.54)
(name "GP13"
(name "GP13_USB_D+"
(effects
(font
(size 1.27 1.27)
+1 -1
View File
@@ -44,7 +44,7 @@ The firmware is able to run on pretty much any ESP32 microcontroller though. But
* DEBUG = 1 if you'd like some more verbose feedback sent to the serial terminal
* USE_DISPLAY = 1 if you were using a board with a display connected
* HAS_KEYBOARD = 1 if you were using a matrix keyboard connected to the microcontroller
* DEBUG_DISPLAY = 1 (in display.h) to receive some more verbose feedback from the display driver
* DEBUG_DISPLAY = 1 (in display.cpp) to receive some more verbose feedback from the display driver
- hit the upload button
- wait for the compilation and upload to complete; this may take a while due to the compilation time of the libraries involved
+37
View File
@@ -1,6 +1,43 @@
/*
* AES256 Seed Phrase Encryptor
*
* Copyright (C) 2026 SCHAUAUS GmbH
*
*/
// genereal definitions
#define DEBUG_DISPLAY 1
// pin definition
#define TFT_CS 14
#define TFT_DC 15
#define TFT_IPS true
#define TFT_MISO -1
#define TFT_MOSI 6
#define TFT_RST 21
#define TFT_SCK 7
#define TFT_BKL 22
#define RGB_LED 8
// display dimensions ESP32-C6-LCD1.47 is portrait by default
#define TFT_HEIGHT 320
#define TFT_WIDTH 172
#define TFT_COL_OFFSET 34 // offset needed due to organization of ST7789 VRAM
#define TFT_ROW_OFFSET 0 // offset needed due to organization of ST7789 VRAM
// set display rotation (needs to be 0 for offsets to be applied properly!)
#define TFT_ROTATION 0
// backlight settings
#define TFT_BKL_DUTY 50
#include <sys/_stdint.h>
#include <sys/_types.h>
#include "pins_arduino.h"
//#include <U8g2lib.h>
#include <Arduino_GFX_Library.h>
#include "display.h"
Arduino_DataBus *bus = new Arduino_HWSPI( TFT_DC, TFT_CS);
+6 -27
View File
@@ -1,30 +1,9 @@
//#include <U8g2lib.h>
#include <Arduino_GFX_Library.h>
#define DEBUG_DISPLAY 0
// pin definition
#define TFT_CS 14
#define TFT_DC 15
#define TFT_IPS true
#define TFT_MISO -1
#define TFT_MOSI 6
#define TFT_RST 21
#define TFT_SCK 7
#define TFT_BKL 22
#define RGB_LED 8
// display dimensions ESP32-C6-LCD1.47 is portrait by default
#define TFT_HEIGHT 320
#define TFT_WIDTH 172
#define TFT_COL_OFFSET 34 // offset needed due to organization of ST7789 VRAM
#define TFT_ROW_OFFSET 0 // offset needed due to organization of ST7789 VRAM
// set display rotation (needs to be 0 for offsets to be applied properly!)
#define TFT_ROTATION 0
// backlight settings
#define TFT_BKL_DUTY 50
/*
* AES256 Seed Phrase Encryptor
*
* Copyright (C) 2026 SCHAUAUS GmbH
*
*/
void display_setup();
void display_help();
+56
View File
@@ -0,0 +1,56 @@
#include <Arduino.h>
#include <iterator>
#include "esp32-hal-gpio.h"
/*
* AES256 Seed Phrase Encryptor
*
* Copyright (C) 2026 SCHAUAUS GmbH
*
*/
// pin definitions
#define KEYBOARD_COL1_PIN 1
#define KEYBOARD_COL2_PIN 2
#define KEYBOARD_COL3_PIN 3
#define KEYBOARD_COL4_PIN 0
#define KEYBOARD_COL5_PIN 5
#define KEYBOARD_ROW1_PIN 18
#define KEYBOARD_ROW2_PIN 19
#define KEYBOARD_ROW3_PIN 20
#define KEYBOARD_ROW4_PIN 23
// project includes
#include "matrix_keyboard.h"
char keyboardCharacters[] = "0123456789ABCDEF<OX>";
int colPins[] = { KEYBOARD_COL1_PIN, KEYBOARD_COL2_PIN, KEYBOARD_COL3_PIN, KEYBOARD_COL4_PIN };
int rowPins[] = { KEYBOARD_ROW1_PIN, KEYBOARD_ROW2_PIN, KEYBOARD_ROW3_PIN, KEYBOARD_ROW4_PIN };
void initKeyboard () {
// set column pins as input pulled low
for ( int i = 0; i < sizeof(colPins) / sizeof(colPins[0]); i++ )
pinMode(colPins[i], INPUT_PULLDOWN);
//set row pins as output
for ( int j = 0; j < sizeof(rowPins) / sizeof(rowPins[0]); j++ ) {
pinMode(rowPins[j], OUTPUT);
digitalWrite(rowPins[j], 0);
}
}
char readKeyboard () {
for ( int i = 0; i < sizeof(rowPins) / sizeof(rowPins[0]); i++ ) { // walk through each row of keys on the matrix keyboard
digitalWrite(rowPins[i], 1);
delay(100);
for ( int j = 0; j < sizeof(colPins) / sizeof(colPins[0]); j++ ) { // read each column of the keyboard to identify a pressed key
if ( digitalRead( colPins[j] ) ) { // check if button is pressed
while ( digitalRead( colPins[j] ) ); // wait until button is released again
digitalWrite(rowPins[i], 0);
return keyboardCharacters[i*4 + j]; // return key
}
}
digitalWrite(rowPins[i], 0);
}
return '\0';
}
+9
View File
@@ -0,0 +1,9 @@
/*
* AES256 Seed Phrase Encryptor
*
* Copyright (C) 2026 SCHAUAUS GmbH
*
*/
void initKeyboard ();
char readKeyboard ();