Giter VIP home page Giter VIP logo

cryptum's Introduction

๐Ÿ‘‹ Hi, Iโ€™m Mihir Patil!

I'm a Sophomore at Purdue University majoring in Computer Science.

Interests

Aerospace / Embedded Systems/ Machine Learning / XR

Member of the avionics subteam at Purdue Space Program Liquids

Alum of @edgemontrobotics

Projects

Made a multiplayer version of Wordle, Wordle Together, which was played over 1 million times

Built a Self-Driving Car with the DepthAI OAK-D camera and Tensorflow

Making computer science education more accessible at Pondr

Research

2021

Pandey, R., Chen, Y., Patil, M., Conway, P. J., Al-Khinji, A., & Mahadevan, D. (2021). Over-expression of CEACAM6 negatively modulates the tumor microenvironment in pancreatic cancer. Cancer Research, 81(13_Supplement), 3156.

cryptum's People

Contributors

0xmihir avatar athryx avatar bilbin avatar cygnusx-26 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cryptum's Issues

Possible performance improvement: Encrypt larger messages at a time

It seems from firmware/main.c:

crypto_lock(mac, rsp + 1, (const uint8_t *)local_cdi, nonce, (const uint8_t *)cmd + 1, MESSAGE_SIZE);

where MESSAGE_SIZE is:

#define MESSAGE_SIZE 126 - MAC_SIZE - NONCE_SIZE

that you only encrypt 86 bytes at a time. I think it would be much faster if you did like the TKey signer does and allocate a lot more memory somewhere (say 64 kiB), fill it with a message to encrypt and then do the encryption over the entire 64 kB at a time instead of doing it frame by frame.

Since you seem to have copied the TKey signer code, look at how APP_CMD_SET_SIZE and APP_CMD_SIGN_DATA fills a chunk of memory (sign_message, hardcoded max 4 kiB), and uses that entire chunk of data to sign. You can do the same thing and maybe up the 4 k to 64 k or something.

Improvement: Use Blake2 in get_random

Hi!

As one of the Tillitis developers, I love to see this project.

A possible small improvement I would like to suggest is to use Blake2 when generating random numbers. The TRNG generates quite good random data (at least I as the developer of the TRNG core think so). But it is recommended to not use the TRNG data directly in an application, but instead as seed to a CSPRNG / DRBG. The reason for this is that if the TRNG starts having bias (possibly due to an attack), is not working correctly, this will affect the output directly. By using a good hash to scramble and compress the TRNG data, you are guaranteed much more uniform randomness with high quality.

You use the random data as nonce for the ChaCha20 based AEAD, and for this algorithm a good nonce is important. In the RNG stream app I use blake2s to generate random numbers by extracting words from the TRNG, and then hash them together:

https://github.com/tillitis/tillitis-key1-apps/blob/main/apps/rng_stream/main.c

(Pardon my ugly C code.)

The downside of this change is that you will need to read out more TRNG data, and perform Blake2 hashing. This will make the get_random function slower. You have the Blake2b function as part of Monocypher, so the code will not increase very much.

Just at suggestion.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.