Bitcoin Forum
September 01, 2026, 11:17:18 AM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Open source N64 encryption app & wallet generator (needs code review)  (Read 142 times)
iloveDigit (OP)
Newbie
*
Offline

Activity: 4
Merit: 11


View Profile
August 19, 2026, 10:55:30 PM
Merited by ABCbits (5), vapourminer (1), mocacinno (1)
 #1

I proposed and helped fund an open-source Nintendo 64 crypto app. There's also a Linux version. It has features like converting dice rolls to Bitcoin wallet addresses, and encrypting/decrypting data. The only input is the N64 controller, the only output is the N64 video output.

This is designed to become arguably the most secure option for securing your stack, but it can't be recommended for more than testing until it gets at least some thorough third-party code review.

Git
https://github.com/bowler-bear/retro-crypto

Original proposal / dev discussion thread
https://bounties.monero.social/posts/168/

I also made a small showcase video about the project:

YouTube (watch only)
https://youtube.com/watch?v=jYAqatkyquU

Nostr (watch or download)
https://jumble.social/notes/nevent1qvzqqqqqqypzqamkcvk5k8g730e2j6atadp6mxk7z4aaxc7cnwrlkclx79z4tzygqyvhwumn8ghj7urjv4kkjatd9ec8y6tdv9kzumn9wshszrnhwden5te0dehhxtnvdakz7qpqsegyykcmq70qdm5u58x8uetucd4pujp27ta66hp7fc8asmlfwrlqyun6n8
ABCbits
Legendary
*
Offline

Activity: 3710
Merit: 10350



View Profile
August 20, 2026, 09:24:24 AM
Merited by iloveDigit (4)
 #2


I only watched some part of the video, but what is size of the cartridge you used? Is it really 4.5MB ones? I can't imagine it's enough for all features (including AES encryption).

iloveDigit (OP)
Newbie
*
Offline

Activity: 4
Merit: 11


View Profile
August 20, 2026, 11:15:57 AM
Last edit: August 20, 2026, 11:34:47 AM by iloveDigit
Merited by ABCbits (2), vapourminer (1)
 #3


I only watched some part of the video, but what is size of the cartridge you used? Is it really 4.5MB ones? I can't imagine it's enough for all features (including AES encryption).

The N64 ROM is actually only 1.4M so far, with all the current features. Here's the pre-compiled file (heads up, Ares is the only emulator known to run it) - https://archive.org/download/retrocrypto-launchvideo/retrocrypto-vidupload-fixed/retro-crypto_n64.z64

The 4.5M number is the N64's shared RAM/VRAM limit when using all 9 bits per byte (or 4M when using standard 8-bit bytes), but there seems to be uncertainty in the community over the biggest cartridge it could handle. Conker's Bad Fur Day for example was a 64MB cartridge, which was limited by the cost of making flash storage, rather than what the N64 could read.
tvbcof
Legendary
*
Online Online

Activity: 5306
Merit: 1354


View Profile
August 27, 2026, 10:40:20 PM
 #4

Watching thread.

sig spam anywhere and self-moderated threads on the pol&soc board are for losers.
dkbit98
Legendary
*
Offline

Activity: 3066
Merit: 8839



View Profile WWW
August 28, 2026, 07:34:13 PM
 #5

This is designed to become arguably the most secure option for securing your stack, but it can't be recommended for more than testing until it gets at least some thorough third-party code review.
I wouldn't call this most secure option at all, but it looks like interesting DIY project for people who already have their old Nintendo 64.
There was similar projects using game consoles in the past but they never gained much popularity.

▄▄██████▄░░░▄██████▄▄
██▀▀░░░░░░░░░░░░░▀▀██
▄▄██████▄▄██████▄▄
▄████▀▀▀▀█████▀▀▀▀████▄
▄███░░░▄▄░░░░░░▄▄░░░███▄
▄▄▄███░░░░██░░░░░░░██░░░░███▄▄▄
████████░░░░██░░░░░░░██░░░░████████
██████████░░░▀▀░░░░░░▀▀░░░██████████
████▀▀██████▄▄▄▄█████▄▄▄▄██████▀▀████
▀███▄░░▀▀███████████████████▀▀░░▄███▀
▀████▄▄░░░░▀▀▀▀▀▀▀▀▀▀▀▀▀░░░░▄▄████▀
▀███████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄███████▀
▀▀█████████████████████▀▀
  
OrangeFren
  
██
██
██
██
██
██
██
██
██
██
██
  
▄▄█████▄▄
▄████▀▀▀████▄
███▀░░░░░░░▀███
███▀░░░▄█░░░░▀███
███░░░░░░░░░░███
███▄░░░▄█▄░░░▄███
███▄░░░░░░░▄███
▀████▄▄▄████▀
█████████
▐█████████▌
██████████
▐████▌▐████▌
▀▀▀█░░░█▀▀▀
 
iloveDigit (OP)
Newbie
*
Offline

Activity: 4
Merit: 11


View Profile
August 30, 2026, 10:46:00 PM
 #6

This is designed to become arguably the most secure option for securing your stack, but it can't be recommended for more than testing until it gets at least some thorough third-party code review.
I wouldn't call this most secure option at all, but it looks like interesting DIY project for people who already have their old Nintendo 64.
There was similar projects using game consoles in the past but they never gained much popularity.


There's no other option for storing Bitcoin that would match the security of a properly vetted version of this. It would be better than a hardware wallet for users that have retained possession of old game systems, because they have less potential than hardware wallets to be designed with backdoors, especially backdoors that would target dice roll conversion functionality.

Do you have any proof of those similar projects? Before I submitted this proposal, I couldn't find proof of those rumors, beyond possibly fake images. I would be interested in having copies of the ROMs.
Cinexa
Jr. Member
*
Online Online

Activity: 34
Merit: 53


View Profile
Today at 04:32:39 AM
 #7

This is not a formal audit, but I believe it is enough to support the OP’s own warning.

When dice/coin/directional input is confirmed, the code hashes user input like this:

Code:
for (uint8_t i = 0; i < stringSize; i++)
    if (inputString[i] == -1) break;
    else data[i] = usedCharSet[inputString[i]];
setSeedFromHashedData(data, stringSize);  // bug: should be actual length, not max buffer size

stringSize is the maximum (100 / 255 / 128), not the number of rolls entered. Unfilled bytes are zero-initialized, so the seed is:

SHA256(actual_rolls || zero_padding)

The UI entropy estimate uses the real input length, but the hash includes padding. That mismatch is a real bug: seeds depend on mode-specific padding, and users may believe they are hashing only what they typed.

The fix is: Track actualLen and pass that to setSeedFromHashedData().

Also, Dogecoin derivation is non-standard (crypto_functions.cpp)

Bitcoin/ETH/Nostr:
Code:
mnemonic_to_seed(mnemonic_from_data(seedBits, seedSize), ...);
hdnode_from_seed(masterNodeSeed, 64, ...);

Dogecoin:
Code:
hdnode_from_seed(seedBits, seedSize, ...);  // raw 32-byte hash, no BIP-39 PBKDF2

Default path is m/0'/3'/0', not BIP-44 m/44'/3'/0'. A Doge address from this tool will not match a typical BIP-39 wallet importing the same mnemonic. That is a fund-loss risk if users assume standard compatibility.

Also, ChaCha DRBG used without initialization (default_rng.cpp)

Vanity address search seeds a ChaCha DRBG via:

Code:
chacha_drbg_reseed(&chachaDrbgContext, seed, seedSize, nullptr, 0);

chacha_drbg_init() is never called. CHACHA_DRBG_CTX is not zeroed in the constructor, so the first chacha_drbg_update() runs against an uninitialized ChaCha state. Vanity grinding RNG is therefore not cleanly seeded from user entropy alone.

Suggested fix is, Zero the context in the constructor and call chacha_drbg_init() before first use.

Moreover, clearSeed() does not wipe mnemonics (context_update_functions.cpp). Returning to the main menu calls clearSeed(), which only updates ContextUpdate::SEED. The contextData.mnemonic string (up to 24 BIP-39 or 25 Monero words) stays in memory with no secure wipe. For a device marketed on minimal secret retention, that is a meaningful gap.

Also, Vanity search silently replaces the user’s seed (vanity_input_page.cpp). After a vanity match, onForward() overwrites the session seed with the brute-forced seed.

Code:
updateContextData(ContextUpdate::SEED | ContextUpdate::SEED_SIZE, generatedData.seedData);
The original dice/coin entropy is gone. If the user does not realize vanity replaces the seed, they may believe they still have an entropy-backed wallet when they do not.

Also, there is a Unbounded encryption allocation (encryption_page.cpp).
inputDataSize is a uint32_t with no upper cap. Pressing UP keeps increasing it until malloc(inputDataSize) fails or exhausts N64 RAM (~4 MB). That is a practical DoS on real hardware, even if not remotely exploitable.

Important Note: I played with my AI Agent and this post is designed by AI.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!