fun fact: Juniper, Cisco and Arista passwords are "encrypted" like this when you list them in `show run`. it's designed to make shoulder surfing slightly harder, I guess? but like, you can also enter passwords in their encrypted form, so it really doesn't guard anything. and it causes operational screwups, since ops assumes it's actually encrypted and safe to share, when it's literally on par with Barbie typewriters.
Re:Barbie Typewriter (2015)
by EvanAnderson on Saturday July 09, 2022 @09:52AM
(#32035084)
I can't speak to Juniper and Arista, but Cisco passwords are "encrypted" with various algorithms depending on the "type" entered (and capabilities of the device). Not all of the algorithms are terrible, though it's still a good idea to redact passwords when sharing configurations anyway. There's a good rundown here: https://media.defense.gov/2022/Feb/17/2002940795/-1/-1/1/CSI...
I'm not sure I quite understand. Why would the password (or something derived from it) be shown at all? Wouldn't a sequence of asterisks or a random string serve the same purpose?
Because “show run” can basically be used to copy configs around iirc
( [*] Note: May require frequency tables for Valley Girl and TextSpeak )
Now I wonder how difficult it would be to replace the firmware to create an AES+base64 typewriter with a configurable key.
Re:Barbie Typewriter (2015)
by arealaccount on Saturday July 09, 2022 @11:13AM
(#32035781)
Would be tough if you don’t know the output until the full message is complete
In a block cipher you should be able to work with 256 bits at a time. You'd be typing 32 characters at a time (assuming ASCII) which get written out at once after you've somehow derived a secure key.
It's not like you can get much feedback from the system in its weird encryption mode either as it's typing out garbage, unless you teach yourself to decode the message from the top of your head (but at that point you don't need the machine to encrypt for you).
This table is at the bottom of TFA:
Standard characters
The most basic frequency analysis should allow you to crack the code even if you don't have the device or the keys.