cryptography-cafe / curve25519-elisabeth Goto Github PK
View Code? Open in Web Editor NEWPure Java implementation of group operations on ristretto255 and Curve25519
License: Other
Pure Java implementation of group operations on ristretto255 and Curve25519
License: Other
We should at least compute it when the library is loaded. Ideally we could hard-code the table itself, but it would be somewhat unwieldy, so we'd need to probably build the constant at compile-time.
An important part of a good cryptographic library is its API. By and large, we only want downstream libraries and applications to use the interface that we have defined, because it helps to ensure that (often security-critical) invariants are enforced (e.g. that an invalid Ristretto group element is unrepresentable, because the only way to instantiate one is through the DECODE
or FROM_UNIFORM_BYTES
functions).
Currently, the way we enforce the API is by keeping all internal classes inside the same package as the API, so that they can be package-private. Java only provides two levels of visibility for classes - public, and package-private - so this is the only way to keep the implementation accessible to the classes providing the API, without giving the implementation public visibility.
However, this still suffers from reflection: anyone with reflection priviledges can make any class (or its members) visible. Java 7 and 8 provide no way for libraries to override this; reflection can only be disabled at the system level via security permissions.
Java 9 introduced the concept of modules, which enable strong encapsulation by preventing reflection into a package by default. Libraries can use this to export their API without exposing any internals, and reflection for exported APIs is disabled. Only when a package is "opened" can reflection be performed. This can be overridden by the user at the system level (by passing flags to the JVM), but it's a significantly improved barrier, and more effectively encourages use of the intended API.
This issue requires:
module-info.java
exporting the intended API.module-info.java
targeting Java 9, while leaving the rest of the codebase targeting Java 7.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.