GSoC new Project Idea "Evolve Crypto module"

99 views
Skip to first unread message

Aditya Gulati

unread,
Mar 11, 2019, 5:17:14 PM3/11/19
to sympy
Hello,
I wanted to discuss a new idea for evolving the crypto module. I am basically planning 4 main things out of which any 2 or 3 can be picked for this years GSoC:
  1. Add block cipher including SPN ciphers, DES, AES, RC4 and modes of operations for each of them. Also create generalised functions to act as P-boxes and S-boxes. 
  2. Add homomorphic cryptosystem, Gentry's cryptosystems (also starting the lattice module required which can be later taken up as another project in later years).
  3. Add the elliptic curve discrete log problem based encryption and decryption system.
  4. Add SHA-3 with the choice on number of rounds in squeezing and output length.
I am experienced in implementing cryptography for a high level course  as well as 2 projects that I have done. I have implementations for some of these already written and just have to change it for the crypto module. I would love to discuss it further with some mentor who could guide me. 

Thanks,
Aditya Gulati
IIT Kanpur

Arif Ahmed

unread,
Mar 11, 2019, 5:45:04 PM3/11/19
to sympy
I would suggest you code up the simplest one out of your list of ideas and implement it. Then open a PR for it and get it reviewed and hopefully merged.
It would be a good indicator that you are able to write code as per existing repository guidelines as well as understand the underlying mathematics involved.

Arif Ahmed

unread,
Mar 11, 2019, 5:47:03 PM3/11/19
to sympy
Just to clarify, I don't mean implementing the whole idea at one go. Break up the idea into various parts and open a PR for the simpler building blocks.

Aaron Meurer

unread,
Mar 11, 2019, 8:18:34 PM3/11/19
to sy...@googlegroups.com
Maybe others will disagree with me, but I'd rather see things that can
be useful outside of just cryptography. For instance a module for
elliptic curves could have uses outside of cryptography. It looks like
your first three ideas are like this (I don't know what P-boxes and
S-boxes are). Correct me if I am wrong but I don't think adding a hash
function would result in adding anything to any other part of SymPy.
Also wouldn't a single hash function be just one pull request?

I'm also a bit uneasy about implementing "modern" algorithms, as
SymPy's crypto module should absolutely NOT be used for any real world
application. But I'd also like to hear others' opinions on what should
be in SymPy.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/753e534d-91f8-4ed4-80f4-01f57eec7cda%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Chris Smith

unread,
Mar 12, 2019, 2:26:58 AM3/12/19
to sympy
As I noted in #16162, it was educational purposes that drove the addition of this module in the first place so I mostly agree that additions should be few. 

Aditya Gulati

unread,
Mar 12, 2019, 3:11:34 PM3/12/19
to sympy
Thank you for your remarks and clarification. I revised my plans to better fit the educational goals. They are as follows, 
  1. Add S-Boxes (Substitution boxes) and P-Boxes (Permutation boxes) as they form the basis of nearly all block ciphers. Maybe add a DES function as its application.
  2. Provide simple functions of frequency counting, shift detector and hamming distance calculator etc.
  3. Add elliptic curves to group theory and its basic functions. Use it to implement elliptic curve based encryption.
  4. Start small lattice function and maybe start a module. Use it to implement lattice based cryptography.
I am planning to finish 1 and 2 before the application period and the elliptic curve in May and lattice module in June. Further, in July, implement the ciphers based on them. In August, I plan to continue developing the lattices module.

I would love to further discuss this. 

Aaron Meurer

unread,
Mar 12, 2019, 4:27:15 PM3/12/19
to sy...@googlegroups.com
How in depth do you intend to go with each of these? I'm not sure
about the others but for elliptic curves at least one could
potentially spend a whole summer just on it.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/fa44c78e-87bc-4b70-bc12-30961e3309d7%40googlegroups.com.

Aditya Gulati

unread,
Mar 19, 2019, 1:45:45 PM3/19/19
to sympy
I was thinking to implement all of the things given here and here. But I also think I should implement basic SPN Ciphers and DES to the crypto module as it is an essential part of cryptography and the basic building block of many ciphers.

Aditya Gulati

P.S. : Sorry for replying so late.
Reply all
Reply to author
Forward
0 new messages