Questions tagged [programming-interface]
10 questions
9
votes
3 answers
Benefits of functional programming languages
So far I mostly saw Python (because of simplicity) and C (because of efficiency) for cryptographic programming. But there is a different kind of programming languages called functional programming languages. An example is Haskell. These languages…
Titanlord
- 2,812
- 13
- 37
3
votes
3 answers
What language is better for implementing a private function evaluation protocol?
I want to implement the 2-party PFE protocol of Katz and Malka (from their Asiacrypt 2011 paper: https://eprint.iacr.org/2010/528). I wanted to ask if there is a strong reason for me to choose one of the following languages for this task:
C or C++:…
Mahyar
- 75
- 6
2
votes
1 answer
Arithmetic in Cyclotomic Number Rings with Shoup's Number Theory Library (NTL)
I wish to do arithmetic on elements in an integer subring of a cyclotomic number field, i.e, in $\mathcal{O}_K = \mathbb{Z}(\zeta) \cong \mathbb{Z}[X] / <\phi_m(x)>$ where $\zeta$ is a root of the m'th cyclotomic polynomial $\phi_m(x)$ . As example,…
Rohit Khera
- 688
- 4
- 11
1
vote
1 answer
How to represent the point-at-infinity(Elliptic Curves) in code?
I am writing code for Elliptic Curve Cryptography. I have a class class EllipticCurvePoint.
class EllipticCurvePoint{
FieldElement x, y;
};
I need to support point-at-infinity (which should behave as if it is an object of type…
Orwell
- 11
- 3
1
vote
1 answer
The goal, the method, and the interface of the signcrypt primitive.
Some time ago, I proposed making the site more educational by teaching correct cryptographic programming. The proposal had had somewhat good reception, but was met with cold ice as there had been little new questions on this topic.
Therefore today…
DannyNiu
- 10,640
- 2
- 27
- 64
1
vote
1 answer
How to declare a twisted finite field like $\mathbb F_p^2=\mathbb F_p[x]$ ÷ ($x^2$ + 1) in SageMath?
Simple question.
in order to declare a regular $\mathbb F_p^2$ finite field, one can do something GF(7^2) but how to declare a finite field like $\mathbb F_p^2=\mathbb F_p[x]$ ÷ ($x^2$ + 1) relative to the characteristic $p$ in SageMath ?
user2284570
- 324
- 4
- 19
1
vote
0 answers
is there any Openssl 3.x API for enabling and disabling FIPS mode?
i'm checking to see if there is any API or mechanism to enable or disable the FIPS Mode during the run time.
Currently the only way to change the FIPS mode is to enable the algorithm_sect (default_properties =…
Zoeb Vora
- 11
- 1
0
votes
1 answer
Is there a function similar to a hash function, but it's reversible?
I am currently making a Python game where the user's high score gets encrypted and stored in a log (a text file). The reason for this encryption is because I don't want the user to be able to enter something (say, 1000000) into the text file. Is…
-2
votes
3 answers
what is it called when encrypt('a') || encrypt('a') == encrypt('aa')?
So normally if you do encrypt('a') twice in a row you'll get the same result. But sometimes (as is the case in SSH) this is not desirable. You want encrypt('a') || encrypt('a') == encrypt('aa'). What is this called?
PHP does it with mcrypt:
neubert
- 2,969
- 1
- 29
- 58