tcl::t...rm::otp(3tcl)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ tcl::transform::otp β€” the manual, bestie edition πŸŽ€

ok so this is a page from the tcllib docs, manual section 3tcl, and the whole fam of pages it lives in is all about reflected/virtual channel support. It's giving very niche, very powerful, very iykyk. πŸ’…


✨ NAME ✨

tcl::transform::otp β€” encryption via one-time pad πŸ”


🌸 SYNOPSIS 🌸

package require Tcl 8.6 9

package require tcl::transform::core ?1.1?

package require tcl::transform::otp ?1.1?

::tcl::transform::otp chan keychanw keychanr

πŸ’– DESCRIPTION πŸ’–

So the tcl::transform::otp package hands you a command that makes a channel transformation. That transformation uses one-time pads that come from outside β€” like, you supply them β€” to do encryption when you're writing and decryption when you're reading. Both directions, one vibe. πŸ¦‹

A related transformation hanging out in this same module is tcl::transform::rot. (Cousins fr fr.)

The internal TclOO class doing all the transform-handler work is a subclass of the tcl::transform::core framework. So it's built on the family foundation, no cap. πŸ‘‘


🌈 API 🌈

  • ::tcl::transform::otp chan keychanw keychanr β€” this command creates a one-time-pad-based encryption transformation layered on top of the channel chan, and it returns the handle for it. 🫢

The two channels keychanw and keychanr hold the one-time pads for the write direction and the read direction, respectively. Their contents get read, and then xored with the bytes written to and read from the channel. That's it, that's the whole trick, xor my beloved. ⭐


πŸ’€ BUGS, IDEAS, FEEDBACK πŸ’€

This document, and the package it describes, will undoubtedly contain bugs and other problems. 😭

Please report them in the category virtchannel of the Tcllib Trackers: [http://core.tcl.tk/tcllib/reportlist]. And if you've got ideas for enhancements for either the package and/or the documentation, please send those too. πŸ™ˆ

When you're proposing code changes, please provide unified diffs, i.e. the output of diff -u.

Also note β€” and this part matters β€” attachments are strongly preferred over inlined patches. To attach stuff, go to the Edit form of the ticket right after you create it, then use the left-most button in the secondary navigation bar. πŸ’…


πŸ”₯ KEYWORDS πŸ”₯

channel transformation, cipher, decryption, encryption, one time pad, otp, reflected channel, tip 230, transformation, virtual channel, xor


πŸ‘‘ CATEGORY πŸ‘‘

Channels


Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net>


ok bestie that's the whole page, you ate it. πŸ’–βœ¨ This was tcllib, version 1.1, and the page is tcl::t...rm::otp(3tcl) β€” go forth and xor responsibly, mwah πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from