GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Sunday, 08-Sep-2024 03:30:05 JST Ryan Castellucci :nonbinary_flag: Ryan Castellucci :nonbinary_flag:
    in reply to
    • Alexandra Magin 🏳️‍🌈

    @recursive TIL const fn

    In conversation about 9 months ago from infosec.exchange permalink
    • Embed this notice
      Alexandra Magin 🏳️‍🌈 (recursive@hachyderm.io)'s status on Sunday, 08-Sep-2024 03:30:06 JST Alexandra Magin 🏳️‍🌈 Alexandra Magin 🏳️‍🌈
      in reply to

      I love that I can populate a const array using a const fn:
      https://github.com/jamagin/cryptopals/blob/b7e79c0eb8faa9ae2bf1f0f5af2a462fa35459aa/src/bytes.rs#L21
      and have the values in the array be Ok(value) for valid inputs and Err(Base64ParseError) for the rest

      I think with some more experience I could write something even clearer for the rest of the implementation, but this feels like a good start:
      https://github.com/jamagin/cryptopals/blob/b7e79c0eb8faa9ae2bf1f0f5af2a462fa35459aa/src/bytes.rs#L57

      Still trying to feel out what's the most sensible thing for arguments and return values in an API, &[u8] vs Vec<u8>

      In conversation about 9 months ago permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        cryptopals/src/bytes.rs at b7e79c0eb8faa9ae2bf1f0f5af2a462fa35459aa · jamagin/cryptopals
        cryptopals in rust. Contribute to jamagin/cryptopals development by creating an account on GitHub.
      2. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        cryptopals/src/bytes.rs at b7e79c0eb8faa9ae2bf1f0f5af2a462fa35459aa · jamagin/cryptopals
        cryptopals in rust. Contribute to jamagin/cryptopals development by creating an account on GitHub.
    • Embed this notice
      Alexandra Magin 🏳️‍🌈 (recursive@hachyderm.io)'s status on Sunday, 08-Sep-2024 03:30:06 JST Alexandra Magin 🏳️‍🌈 Alexandra Magin 🏳️‍🌈
      in reply to

      and yes that means that very soon I will have to implement AES-128-ECB

      In conversation about 9 months ago permalink
    • Embed this notice
      Alexandra Magin 🏳️‍🌈 (recursive@hachyderm.io)'s status on Sunday, 08-Sep-2024 03:30:07 JST Alexandra Magin 🏳️‍🌈 Alexandra Magin 🏳️‍🌈

      Doing Cryptopals in Rust with a commitment to use nothing except the standard library is definitely making me a better Rust programmer

      I just finished doing base64 decoding (with padding and whitespace handling a la PEM, MIME, etc) and it may not be the prettiest code, but I'm pretty confident in its correctness. I want to never use a less strongly typed language ever again (I'll probably be forced to on Monday)

      In conversation about 9 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.