Re:I'm not a fan of Deno's security model (2024)
by dingaling911 on Sunday November 08, 2026 @12:15PM
(#50415128)
I don't understand the UX you have in mind, just do it like SSH used to do, a non-echo input field?
Re:I'm not a fan of Deno's security model (2024)
by phyzome on Sunday November 08, 2026 @01:44PM
(#50415828)
Oh, it's not like a password (where you'd want to prevent echo). The value is actually a digest of a public key -- one instance of the program prints the digest, and the user has to enter it into the other instance of the program. This is for setting up a secure P2P connection.
I may have misstated the problem above. What I really need to ensure is that a malicious output can't say "the digest is abc123" and trick the user into pasting that into the other program (when the real digest is def456).
Re:I'm not a fan of Deno's security model (2024)
by dingaling911 on Sunday November 08, 2026 @04:16PM
(#50417359)
Just have a link that the user can click that copies the correct hash to the clipboard.
Re:I'm not a fan of Deno's security model (2024)
by phyzome on Sunday November 08, 2026 @06:17PM
(#50418684)
Both ends are terminal programs.
Re:I'm not a fan of Deno's security model (2024)
by dingaling911 on Sunday November 08, 2026 @07:09PM
(#50419201)
So side A prints out a value, side B has to input it using the user as the go between.
Hmm...
Isn't there a public key based way to avoid needing the user to do this.
Re:I'm not a fan of Deno's security model (2024)
by phyzome on Sunday November 08, 2026 @08:19PM
(#50419746)
Not really, no. This is the public key based way of doing things.
Re:I'm not a fan of Deno's security model (2024)
by dingaling911 on Sunday November 08, 2026 @09:15PM
(#50420144)
I mean the value gets encrypted or signed with a private key.
Re:I'm not a fan of Deno's security model (2024)
by phyzome on Sunday November 08, 2026 @10:52PM
(#50420872)
Not really applicable here. If you want to create an alternative design, I recommend first looking at src/protocol.rs to see what the current design constraints are. (Or the README.md for the overall workflow.)
Re:I'm not a fan of Deno's security model (2024)
by kccqzy on Sunday November 08, 2026 @02:07PM
(#50416040)
Stripping out just the control characters isn’t enough. A lot of terminal control sequences start with a single control character followed by normal printable characters but such printable characters are part of the control sequence. And even when you strip out entire terminal control sequences there are still other Unicode characters that will play tricks. Examples include the Unicode right-to-left override, which is not an ASCII control character but a Unicode control character. There are also dozens of space characters that look like spaces but won’t be split by ASCII word splitting processing, etc.
My plan was to encode to Unicode (lossily), strip out control characters, and add some visual framing. Anything else I should be considering? Is there a standard approach? Haven't actually done the research on this yet, but since it came up here, I figure someone might know.
(This is https://codeberg.org/timmc/breakmancer if anyone is interested.)