Skip to content

Instantly share code, notes, and snippets.

@Pratyush
Pratyush / diffie-hellman-and-elgamal.ipynb
Created March 28, 2024 03:49
Diffie--Hellman and Elgamal.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
pub trait GlvMul {
// whatever trait methods you need
}
pub trait SWModelParameters {
fn scalar_mul(thing: SWAffine<Self>, other: bits) -> SWAffine<Self> {
// default double and add impl
}
}

Keybase proof

I hereby claim:

  • I am pratyush on github.
  • I am pratyush795 (https://keybase.io/pratyush795) on keybase.
  • I have a public key ASBFQMtaGcGctoGWQnUZLMOD0qitD_s55z7krSkQpNU-ygo

To claim this, I am signing this object:

@Pratyush
Pratyush / sample_edwards.sage
Created August 15, 2019 15:06
Sample complete twisted edwards curves
# Authors: Sean Bowe, Alessandro Chiesa, Matthew Green, Ian Miers, Pratyush Mishra, Howard Wu
#
# This script rigidly generates Montgomery or (twisted) Edwards curves over a given base prime field.
# Note that we ensure twist security
# Throughout, we write "Edwards" to mean "twisted Edwards".
# TODO: add function to check embedding degree, etc
# References:
# [BBJLP]: Bernstein, Birkner, Joye, Lange, Peters --- "Twisterd Edwards curves"