yannick-cw / scalassss Goto Github PK
View Code? Open in Web Editor NEWScala implementation of shamir's secret-sharing scheme.
License: MIT License
Scala implementation of shamir's secret-sharing scheme.
License: MIT License
Looks good, pretty clear.
Is the prime a BigInt
or a String
? You say both in parts of the readme.
Why MD5? Is it specified? Seems an odd choice for a new project.
You might like to use a StringContext
pimp for BigInt
literals.
Why is BigPrimes#primes
a List
? Wouldn't some kind of map be better?
LaGrangeInterpolation#L19
the ->
is misleading.
gcdD
should probably return a case class
rather than a list? Or I may be misunderstanding.
Consider parameterizing SSSSOps
by F[_]: Monad
(and the implementation uses Either[ShareError, ?]
(kind-projector syntax)) rather than parameterizing by Error
- that's more in line with what people would expect.
There's a lot of cases when you're foldLeft
ing with something that's literally a group (so certainly a monoid). Scala has an awkward relationship with multiple groups using the same base set, but you might consider representing multiplicative integers mod p
(or the kind of linear-congruence stuff you're doing) with a wrapper type that has a monoid instance, and then you can replace a lot of the foldLeft
s with just sum
operations. Have a look at spire which may have the algebraic constructs you're using already.
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.