You are browsing as a guest. Sign up (or log in) to start making projects!

apiKEY

Hardware
  • 10 Devlogs
  • 60 Total hours

a physical api KEY !

Ship #1

A physical API key password manager that stores your passwords PHYSICALLY, so you never have to trust a cloud service again nor use a pesky server - all local and extremely portable !

  • 0 devlogs
  • 0h build
Video of Project → See source code →
Open comments for this post

9h 0m logged

IM A GENIUS !!!!!

Today i moved my sorry ass back into the makespace, and burned through another switch before finally doing it !
I figured out that the trick to it is using flux so your solder melts easy, then applying solder to the wire first
and then only applying flux on the pad and soldering - it took like two hours and i had to use one of those “helping hands” dr octopus thingys
but i was feeling like tony stark the entire time.

i failed once, then resoldered and tested with a multimeter, and everything beeped like it was supposed to when i poked it !

So basically i cut 3 female to male wires, and soldered just the female parts bare side on to the switch, and stuck the other side on to some GPIO pins on the ESP, and it worked ! … sometimes - my solder joint on one of the switch pads
(the one that triggers when you tilt the switch down) was bad, so i had ta resolder that, but then i was fine.

So i got back home after playing a round of cards against humanity (rlly cool btw) and then the fun really began.

First thing i did when i got home was flash my new and improved software ! i was extremely surprised when it actually worked ! it was just to test if the switch was working (display would say UP, DOWN, and PRESS when i used the button)
After that i got cracking, and implemented a 4-digit pin, and the UI for selecting API keys, since i had done everything else yesterday.

After 2 hours of trial and error i got it working !

you are able to scroll through numbers by tilting up and down

and you can select by pressing down, and it would move on to the next number

If ya select it wrong, then you get with this in all caps

if ya get it right, you get greeted by a lovely selection of all your stored credentials :

then the next part was the actual typing - this was the hardest part. you see, i had initially thought i can just simulate how a usb keyboard or one with a dongle types, but nooo
it can never be that easy can it ? well it can’t, cause the esp32 c3 supermini doesn’t have that capability - while it can type, it can only do that over bluetooth, which is rather annoying, but not make or break for the project.
So now the esp autoconnects to the laptop via bluetooth and can type in passwords without actually being connected to the laptop -
which opens up new possibilites (or old ones cause id thought of this b4 lmao. just ignore, it adds more drama and plot to the journal).
Ya see, now the device is basically entirely wireless, except that it needs a pwr source - and you know what a portable power source is ? a power bank - wait what ? no that would be way
too bulky - i mean a battery. Thats thoughts for later tho.

I lost the plot a bit. where was I ?

Oh yeah, the typing. Ok, so after finishing the bluetooth typing program even though my device thought it was typing, nothing showed up on my laptop. that wasn’t good.
So i had ta tweak my script a bunch to find out where the problem was, just to find out that the problem couldn’t be with my code. So it had to be with my laptop. So i had to do a LOT of research (and deepseek pestering)
to find the most obvious culprit : MacOS being paranoid. Ya see, macos needs some stupid bullshit security stuff that aint important at all. Since i was not a fan of that, i basically just asked opencode to “make code work, make code faster”.
So it optimized and fixed my code to be all cushy with macos again. then i clicked on one of the test api keys, and it worked ! but it didn’t enter the last letter ….

Ugh.

So i went back in the code, made a number 1 higher, and also made it press enter at the end, and it works !!!!!

I CANNOT BELIEVE IT !

IM done !

Ok, not quite.
I still have to decide if im adding a battery, and i gotta go back to the makespace, glue this shit together (so it doesnt rip off again when i move it) and then make a nice lil case

[Entry truncated]

0
0
2
Open comments for this post

9h 0m logged

IM A GENIUS !!!!!

Today i moved my sorry ass back into the makespace, and burned through another switch before finally doing it !
I figured out that the trick to it is using flux so your solder melts easy, then applying solder to the wire first
and then only applying flux on the pad and soldering - it took like two hours and i had to use one of those “helping hands” dr octopus thingys
but i was feeling like tony stark the entire time.

i failed once, then resoldered and tested with a multimeter, and everything beeped like it was supposed to when i poked it !

So basically i cut 3 female to male wires, and soldered just the female parts bare side on to the switch, and stuck the other side on to some GPIO pins on the ESP, and it worked ! … sometimes - my solder joint on one of the switch pads
(the one that triggers when you tilt the switch down) was bad, so i had ta resolder that, but then i was fine.

So i got back home after playing a round of cards against humanity (rlly cool btw) and then the fun really began.

First thing i did when i got home was flash my new and improved software ! i was extremely surprised when it actually worked ! it was just to test if the switch was working (display would say UP, DOWN, and PRESS when i used the button)
After that i got cracking, and implemented a 4-digit pin, and the UI for selecting API keys, since i had done everything else yesterday.

After 2 hours of trial and error i got it working !

you are able to scroll through numbers by tilting up and down

and you can select by pressing down, and it would move on to the next number

If ya select it wrong, then you get with this in all caps

if ya get it right, you get greeted by a lovely selection of all your stored credentials :

then the next part was the actual typing - this was the hardest part. you see, i had initially thought i can just simulate how a usb keyboard or one with a dongle types, but nooo
it can never be that easy can it ? well it can’t, cause the esp32 c3 supermini doesn’t have that capability - while it can type, it can only do that over bluetooth, which is rather annoying, but not make or break for the project.
So now the esp autoconnects to the laptop via bluetooth and can type in passwords without actually being connected to the laptop -
which opens up new possibilites (or old ones cause id thought of this b4 lmao. just ignore, it adds more drama and plot to the journal).
Ya see, now the device is basically entirely wireless, except that it needs a pwr source - and you know what a portable power source is ? a power bank - wait what ? no that would be way
too bulky - i mean a battery. Thats thoughts for later tho.

I lost the plot a bit. where was I ?

Oh yeah, the typing. Ok, so after finishing the bluetooth typing program even though my device thought it was typing, nothing showed up on my laptop. that wasn’t good.
So i had ta tweak my script a bunch to find out where the problem was, just to find out that the problem couldn’t be with my code. So it had to be with my laptop. So i had to do a LOT of research (and deepseek pestering)
to find the most obvious culprit : MacOS being paranoid. Ya see, macos needs some stupid bullshit security stuff that aint important at all. Since i was not a fan of that, i basically just asked opencode to “make code work, make code faster”.
So it optimized and fixed my code to be all cushy with macos again. then i clicked on one of the test api keys, and it worked ! but it didn’t enter the last letter ….

Ugh.

So i went back in the code, made a number 1 higher, and also made it press enter at the end, and it works !!!!!

I CANNOT BELIEVE IT !

IM done !

Ok, not quite.
I still have to decide if im adding a battery, and i gotta go back to the makespace, glue this shit together (so it doesnt rip off again when i move it) and then make a nice lil case

[Entry truncated]

0
0
2
Open comments for this post

6h 0m logged

Yeah, i fcked up big time.
I first tried soldering the ESP32 c3 supermini to the display - this was damn hard.
I first took a thick ass cable that kept touching the other pins on the supermini, but still pressed through - and well, it didn’t work.
It took like an hour to solder the shit on, and it was damn hard cause the space between the pins was tiny and i have next to no experience with soldering, but i pressed through,
and it ended up not working. So i removed all the wires again, used thinner wires, and then it didn’t work AGAIN cause some of the non covered parts of the wires were exposed. UGHHH right ?
Then i tried again, and also put some solder on the wire so that it sticks and doesn’t like wierdly frizzle, then soldered everything again and then
put like a TON of tape on it for insulation, then decided it was too much tape and took it off.

Anyway, that finally worked, so tadaa !

then came the horrible part :

the damn switches.

You see, these damn switches use SMD. Thats bad enough. Then THEY HAVE THE AUDACITY TO F$#@!ng MELT WHEN YOU try and solder something on the pad - i mean it literally.

The damn thing would honest to god literally damn melt when i tried to solder wires on it.
And as if that aint bad enough it also has balls enough to literally lose its PADS - the literally just come off, and then theres nothing to attach the damn wires to !

Needless to say, i burnt, melted, snapped andraged through 4 switches - and it wasn’t just my fault either :

Sure, the first time i was careless, but the second time i took as much care as a literal surgeon doing brain surgery, and the pad still snapped of and left me fuming.
Then i gave it to my friend whos been soldering for literal years - and he fucked up twice too. So yea, whoever made these switches, FUDGE them. (mom, if you read this, i really tried, i really did)

I pretty much spent the entire day at the makespace, and i made barely any progress.

Btw i managed to melt an esp by going too close to it with a hot air solder gun, and i also managed to melt my display.

Today was pretty much a waste.

0
0
2
Open comments for this post

6h 0m logged

Yeah, i fcked up big time.
I first tried soldering the ESP32 c3 supermini to the display - this was damn hard.
I first took a thick ass cable that kept touching the other pins on the supermini, but still pressed through - and well, it didn’t work.
It took like an hour to solder the shit on, and it was damn hard cause the space between the pins was tiny and i have next to no experience with soldering, but i pressed through,
and it ended up not working. So i removed all the wires again, used thinner wires, and then it didn’t work AGAIN cause some of the non covered parts of the wires were exposed. UGHHH right ?
Then i tried again, and also put some solder on the wire so that it sticks and doesn’t like wierdly frizzle, then soldered everything again and then
put like a TON of tape on it for insulation, then decided it was too much tape and took it off.

Anyway, that finally worked, so tadaa !

then came the horrible part :

the damn switches.

You see, these damn switches use SMD. Thats bad enough. Then THEY HAVE THE AUDACITY TO F$#@!ng MELT WHEN YOU try and solder something on the pad - i mean it literally.

The damn thing would honest to god literally damn melt when i tried to solder wires on it.
And as if that aint bad enough it also has balls enough to literally lose its PADS - the literally just come off, and then theres nothing to attach the damn wires to !

Needless to say, i burnt, melted, snapped andraged through 4 switches - and it wasn’t just my fault either :

Sure, the first time i was careless, but the second time i took as much care as a literal surgeon doing brain surgery, and the pad still snapped of and left me fuming.
Then i gave it to my friend whos been soldering for literal years - and he fucked up twice too. So yea, whoever made these switches, FUDGE them. (mom, if you read this, i really tried, i really did)

I pretty much spent the entire day at the makespace, and i made barely any progress.

Btw i managed to melt an esp by going too close to it with a hot air solder gun, and i also managed to melt my display.

Today was pretty much a waste.

0
0
2
Open comments for this post

7h 0m logged

ok, i pretty much got everything workin except the switch - ill go from good to bad, alright ?

so now my login page fully works and can be deployed by the ESP32 (its in the flash), and also storing API keys - im using something called LittleFS to store them even when there is no power

Basically this is the boot sequence :

Boot sequence (main.cpp)

  1. Serial + OLED init — boots and shows “booting…”
  2. LittleFS init — mounts the flash filesystem where the vault file lives
  3. WiFi starts immediately — creates the ApiKEY access point at 192.168.4.1. Web server starts serving the login page. Works before any PIN is entered.
  4. Vault check — opens /vault.dat, reads the 4-byte magic number APIK to see if a vault exists
  5. If no vault (first boot): waits for you to create a PIN via serial (or buttons once wired). Creates an empty vault, encrypts it, saves it to flash.
  6. If vault exists: waits for PIN via serial (or you can just use the web UI instead)
  7. Loads vault — tries to decrypt with the entered PIN
  8. BLE keyboard starts — advertises itself as “ApiKEY” bluetooth keyboard

WiFi / Web UI (web.cpp)
The ESP32 is a WiFi access point — your phone connects directly to it, no router needed.

  • SSID: ApiKEY, password: apikey123
  • Serves a dark-themed web page at 192.168.4.1
  • Login page → enter PIN → Manage page → add/delete/view keys
    The key change we just made: the web login actually tries to decrypt the vault with whatever PIN you type (handleLogin calls loadVault). So the web UI works independently — you don’t need to enter the PIN on serial first. If the decryption succeeds, it sets authenticated = true and stores the PIN for later re-encryption.

And for once, everything works like its supposed to (please don’t let thisn be a jinx) - I know right ? it has to be a miracle !

Now comes the bad part.

So after i was done with all this, i started on tryna add the switch. I luckily had brought 2 from xHain, but i unfortunatelty did NOT know how they worked.
Luckily i had a Multimeter, and unfaltering determination (for now)

I basically started poking the pins until something went beep, then tried angling and pressing the switch, while still hunting beeps.
Let me tell you, this was grueling - i only got 2 hands, and i had to hold :

  • multimeter red needle on to a tiny pin
  • multimeter black needle on to an even smaller pin sob
  • the switch thats smaller than my fingernail so that it stops wiggling and turning
  • the actual switch part thats smaller than idk i dont gotta comparison here - and i gotta angle it without turning the whole switche

Man, i wish i had 5 hands. Evolutions such a bitch, why not let us all have 6 hands with 10 fingers ?

Anyway, even after doing all that and poking every single pin or pad or anything even remotely shiny on the switch with the pin i finally moved on to the second switch and it beeped first try. FIRST TRY.
turns out my first switch was broken, and the second wasn’t. Yeah.

It probably died of agressive poking.

Anyway, i then was ready to connect the switch, but guess what ? i ran out of solder, and the damn thing uses SMD pads. And for some damn
reason i dont got a hot glue gun.

sigh

you’ve gotta be kidding me.

Im gonna go to the makespace tmrw, and then solder it on

SOOOO .. im basically done with everything except adding the switch, testing my keyboard, and making a case for it !

Now the next thing to decide is if im making the thing wireless - its really not that hard, the ESP does all the actual hard stuff for me - all i would have to do is add a power source.
I still want to keep it low profile tho, since this is gonna go on my keyring - we’ll see.

0
0
2
Open comments for this post

7h 0m logged

ok, i pretty much got everything workin except the switch - ill go from good to bad, alright ?

so now my login page fully works and can be deployed by the ESP32 (its in the flash), and also storing API keys - im using something called LittleFS to store them even when there is no power

Basically this is the boot sequence :

Boot sequence (main.cpp)

  1. Serial + OLED init — boots and shows “booting…”
  2. LittleFS init — mounts the flash filesystem where the vault file lives
  3. WiFi starts immediately — creates the ApiKEY access point at 192.168.4.1. Web server starts serving the login page. Works before any PIN is entered.
  4. Vault check — opens /vault.dat, reads the 4-byte magic number APIK to see if a vault exists
  5. If no vault (first boot): waits for you to create a PIN via serial (or buttons once wired). Creates an empty vault, encrypts it, saves it to flash.
  6. If vault exists: waits for PIN via serial (or you can just use the web UI instead)
  7. Loads vault — tries to decrypt with the entered PIN
  8. BLE keyboard starts — advertises itself as “ApiKEY” bluetooth keyboard

WiFi / Web UI (web.cpp)
The ESP32 is a WiFi access point — your phone connects directly to it, no router needed.

  • SSID: ApiKEY, password: apikey123
  • Serves a dark-themed web page at 192.168.4.1
  • Login page → enter PIN → Manage page → add/delete/view keys
    The key change we just made: the web login actually tries to decrypt the vault with whatever PIN you type (handleLogin calls loadVault). So the web UI works independently — you don’t need to enter the PIN on serial first. If the decryption succeeds, it sets authenticated = true and stores the PIN for later re-encryption.

And for once, everything works like its supposed to (please don’t let thisn be a jinx) - I know right ? it has to be a miracle !

Now comes the bad part.

So after i was done with all this, i started on tryna add the switch. I luckily had brought 2 from xHain, but i unfortunatelty did NOT know how they worked.
Luckily i had a Multimeter, and unfaltering determination (for now)

I basically started poking the pins until something went beep, then tried angling and pressing the switch, while still hunting beeps.
Let me tell you, this was grueling - i only got 2 hands, and i had to hold :

  • multimeter red needle on to a tiny pin
  • multimeter black needle on to an even smaller pin sob
  • the switch thats smaller than my fingernail so that it stops wiggling and turning
  • the actual switch part thats smaller than idk i dont gotta comparison here - and i gotta angle it without turning the whole switche

Man, i wish i had 5 hands. Evolutions such a bitch, why not let us all have 6 hands with 10 fingers ?

Anyway, even after doing all that and poking every single pin or pad or anything even remotely shiny on the switch with the pin i finally moved on to the second switch and it beeped first try. FIRST TRY.
turns out my first switch was broken, and the second wasn’t. Yeah.

It probably died of agressive poking.

Anyway, i then was ready to connect the switch, but guess what ? i ran out of solder, and the damn thing uses SMD pads. And for some damn
reason i dont got a hot glue gun.

sigh

you’ve gotta be kidding me.

Im gonna go to the makespace tmrw, and then solder it on

SOOOO .. im basically done with everything except adding the switch, testing my keyboard, and making a case for it !

Now the next thing to decide is if im making the thing wireless - its really not that hard, the ESP does all the actual hard stuff for me - all i would have to do is add a power source.
I still want to keep it low profile tho, since this is gonna go on my keyring - we’ll see.

0
0
2
Open comments for this post

6h 0m logged

Alright, so today i was able to pick up the switch, but before i add it i want the core mechanics working first.

First thing i had ta do was figure out how to store the API keys, and how to add and remove em.

I already had an idea going since the start, and thats also one of the reasons i used an ESP32 - you see the ESP has Bluetooth and WiFi.

That means it can fetch stuff from the internet.

So my first idea for adding/removing API keys was this :

The ESP32 fetches data from the API of a pwd manager app - so the flow for adding and removing passwords and API keys is
just to add them to your password manager - simple right ? answer is no, as most of these API’s arent well documented and would add unnecessary complexity, and
the device wouldn’t work if im not at home, as it would need WiFi to fetch stuff.

Then i thought maybe i could just directly flash the Keys, but i scrapped that pretty quickly cause then id have ta open an IDE, manually change code, etc.
Also it would have to be plugged into my laptop, even though i wanted to keep the possibility of turning the entire thing bluetooth alive.

The idea that finally clicked needed a bit of research :

You see, i was scrolling youtube and saw one of those “top 3 things to use an ESP for” videos, and watched till the end - and the first
thing the dude showed was that an ESP can actually broadcast its OWN WiFI that can host webpages. I mean how cool is that ?

So i got my ESP to broadcast a network called APIKey.

Then with a bit of help from opencode, i was able to code a nice frontend to just add/remove passwords.

Then i decided i also wanted to implement a pin, so noone can get their grubby lil fingers on py passwords.
So i added that to my website, and i will later add that to the physical key too - ill enter the pin by using the 2 way switch to select numbers from 0 - 9.

Now your probably wondering how ta open the website, and thats the simplest part - its literally just hosted locally on the ESP, so ya
just enter http://192.168.4.1 and tadaaaa :

for now the wifi password is literally apikey123 and the pin is a symbolic 1 2 3 4

Thats it for today, but on a side note, i picked up the switch and will add it tmrw :D

0
0
1
Open comments for this post

2h 0m logged

I saw one of these at my makespace (i know your jealous) but forgot to take a irl pic, found it online tho

i think this is good, i might change later tho
This can be pushed forward, back, and pressed down, so its great for selecting stuff

After that i just worked on connecting the display - i followed the tutorial at https://www.instructables.com/Arduino-and-the-SSD1306-OLED-I2C-128x64-Display/,
but the Arduino IDE was being a bish, and the I2C scanner wasn’t working - there were 2 reasons :

  • First, I had the wrong I2C scanning program twice (it wasn’t compatible with ESP32, it was only meant for arduino)
  • Second, there is a tiny difference in some displays - most use 0x3C with SA0 pin pulled low, but some use 0x3D with SA0 pin pulled high, whatever the hell that means.
  • Third, and i saved the best for last, i was giving it 3.3V which should have worked, but again, it was a should. So i switched to +5V VDD, and it started up !

I just wanted to test the display was working, but it turned into a real marathon.

Anyway, i wasn’t sure if i had space for Hello World, so heres just a hello :

Also, im realizing now, i definetely have space for that, since there are two rows for text. lmao.

Anyway, im signing off today, and i’ll be back tmrw, because first its late now, and also i forgot to take the lil switch with me, so tomorrow i gotta go pick
it up from xHain (my makespace even has a cool name :P)

0
0
2
Open comments for this post

6h 0m logged

Alright, so today i was able to pick up the switch, but before i add it i want the core mechanics working first.

First thing i had ta do was figure out how to store the API keys, and how to add and remove em.

I already had an idea going since the start, and thats also one of the reasons i used an ESP32 - you see the ESP has Bluetooth and WiFi.

That means it can fetch stuff from the internet.

So my first idea for adding/removing API keys was this :

The ESP32 fetches data from the API of a pwd manager app - so the flow for adding and removing passwords and API keys is
just to add them to your password manager - simple right ? answer is no, as most of these API’s arent well documented and would add unnecessary complexity, and
the device wouldn’t work if im not at home, as it would need WiFi to fetch stuff.

Then i thought maybe i could just directly flash the Keys, but i scrapped that pretty quickly cause then id have ta open an IDE, manually change code, etc.
Also it would have to be plugged into my laptop, even though i wanted to keep the possibility of turning the entire thing bluetooth alive.

The idea that finally clicked needed a bit of research :

You see, i was scrolling youtube and saw one of those “top 3 things to use an ESP for” videos, and watched till the end - and the first
thing the dude showed was that an ESP can actually broadcast its OWN WiFI that can host webpages. I mean how cool is that ?

So i got my ESP to broadcast a network called APIKey.

Then with a bit of help from opencode, i was able to code a nice frontend to just add/remove passwords.

Then i decided i also wanted to implement a pin, so noone can get their grubby lil fingers on py passwords.
So i added that to my website, and i will later add that to the physical key too - ill enter the pin by using the 2 way switch to select numbers from 0 - 9.

Now your probably wondering how ta open the website, and thats the simplest part - its literally just hosted locally on the ESP, so ya
just enter http://192.168.4.1 and tadaaaa :

for now the wifi password is literally apikey123 and the pin is a symbolic 1 2 3 4

Thats it for today, but on a side note, i picked up the switch and will add it tmrw :D

0
0
2
Open comments for this post

2h 0m logged

I saw one of these at my makespace (i know your jealous) but forgot to take a irl pic, found it online tho

i think this is good, i might change later tho
This can be pushed forward, back, and pressed down, so its great for selecting stuff

After that i just worked on connecting the display - i followed the tutorial at https://www.instructables.com/Arduino-and-the-SSD1306-OLED-I2C-128x64-Display/,
but the Arduino IDE was being a bish, and the I2C scanner wasn’t working - there were 2 reasons :

  • First, I had the wrong I2C scanning program twice (it wasn’t compatible with ESP32, it was only meant for arduino)
  • Second, there is a tiny difference in some displays - most use 0x3C with SA0 pin pulled low, but some use 0x3D with SA0 pin pulled high, whatever the hell that means.
  • Third, and i saved the best for last, i was giving it 3.3V which should have worked, but again, it was a should. So i switched to +5V VDD, and it started up !

I just wanted to test the display was working, but it turned into a real marathon.

Anyway, i wasn’t sure if i had space for Hello World, so heres just a hello :

Also, im realizing now, i definetely have space for that, since there are two rows for text. lmao.

Anyway, im signing off today, and i’ll be back tmrw, because first its late now, and also i forgot to take the lil switch with me, so tomorrow i gotta go pick
it up from xHain (my makespace even has a cool name :P)

0
0
2

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…