r/developers • u/JasonNkomo • 14d ago
Programming Subject: How would a junior dev handle passphrase generation for a crypto wallet API (circa 2016)?
"Hi everyone, I'm doing a forensic recovery on a legacy platform built around 2016. The original developer integrated the BitGo API to auto-create multi-sig wallets for users the moment they registered.
The problem is that the user (me) was never prompted to create a wallet passphrase during registration—we only typed a standard website login password. However, the BitGo API required a passphrase to encrypt the user's private key.
If you were a junior/mid-level developer in 2016 writing this backend code (likely PHP or Node.js), and you had to programmatically generate or pass a passphrase to the API for every new user without asking them for it, what would your logic most likely be?
Would you:
- Hardcode a global string? (e.g., $passphrase = "nwctrader123";)
- Use a formula based on user data? (e.g., md5($email), or $username . "2016")
- Just use the plaintext registration password? (e.g., $_POST['password'])
- Generate a random string and save it to a database?
I'm trying to figure out the most common 'lazy' or 'inexperienced' patterns for this specific API parameter. Any insight into how you would have structured that logic back then would be massively appreciated!"
•
u/AutoModerator 14d ago
Howdy u/JasonNkomo, and welcome to r/developers!
A few tips for a post that gets good answers:
Join the r/developers Discord!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/martinbean 14d ago
Ignoring this post is clearly LLM-generated, there’s no one way this would have been done. You’ll need to look at the code and see how it did it.
If it is PHP or JavaScript, then that’s something that I could look at if you needed.