ssavvides / jope Goto Github PK
View Code? Open in Web Editor NEWOrder-preserving encryption in Java
License: Apache License 2.0
Order-preserving encryption in Java
License: Apache License 2.0
Hi,
thank you for this code,
I had this problem, could you help me please:
java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.implInit(Cipher.java:805)
at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
at javax.crypto.Cipher.init(Cipher.java:1396)
at javax.crypto.Cipher.init(Cipher.java:1327)
at Pseuohomo.Coins.next(Coins.java:77)
at Pseuohomo.Hgd.prngDraw(Hgd.java:60)
at Pseuohomo.Hgd.hypergeometricHrua(Hgd.java:151)
at Pseuohomo.Hgd.rhyper(Hgd.java:67)
at Pseuohomo.OPE.sampleHGD(OPE.java:169)
at Pseuohomo.OPE.encryptRecursive(OPE.java:60)
at Pseuohomo.OPE.encrypt(OPE.java:35)
at Pseuohomo.OPE.main(OPE.java:191)
Exception in thread "main" java.lang.NullPointerException
at Pseuohomo.Coins.next(Coins.java:94)
at Pseuohomo.Hgd.prngDraw(Hgd.java:60)
at Pseuohomo.Hgd.hypergeometricHrua(Hgd.java:151)
at Pseuohomo.Hgd.rhyper(Hgd.java:67)
at Pseuohomo.OPE.sampleHGD(OPE.java:169)
at Pseuohomo.OPE.encryptRecursive(OPE.java:60)
at Pseuohomo.OPE.encrypt(OPE.java:35)
at Pseuohomo.OPE.main(OPE.java:191)
BigDecimal d9 = BigDecimal.valueOf(1.9999542254);
BigDecimal d = loggam(d9.add(BigDecimal.ONE));
System.out.println(d); //-0.000019352145145910313920070482
correct value is 0.69310494089 (https://www.wolframalpha.com/input/?i=loggamma%281.9999542254+%2B+1%29)
it's giving the value of loggamma(d9)
not loggamma(d9+1)
which is curious. It wouldn't matter if you called loggamma(d9)
but you're calling loggamma(d9+1)
so I think it's incorrect?
run:
java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1039)
at javax.crypto.Cipher.implInit(Cipher.java:805)
at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
at javax.crypto.Cipher.init(Cipher.java:1396)
at javax.crypto.Cipher.init(Cipher.java:1327)
at jope.Coins.next(Coins.java:72)
at jope.Hgd.prngDraw(Hgd.java:61)
at jope.Hgd.hypergeometricHrua(Hgd.java:156)
at jope.Hgd.rhyper(Hgd.java:69)
at jope.OPE.sampleHGD(OPE.java:162)
at jope.OPE.encryptRecursive(OPE.java:57)
at jope.OPE.encrypt(OPE.java:35)
at jope.OPE.main(OPE.java:184)
Exception in thread "main" java.lang.NullPointerException
at jope.Coins.next(Coins.java:89)
at jope.Hgd.prngDraw(Hgd.java:61)
at jope.Hgd.hypergeometricHrua(Hgd.java:156)
at jope.Hgd.rhyper(Hgd.java:69)
at jope.OPE.sampleHGD(OPE.java:162)
at jope.OPE.encryptRecursive(OPE.java:57)
at jope.OPE.encrypt(OPE.java:35)
at jope.OPE.main(OPE.java:184)
C:\Users\haypo\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
构建失败 (总时间: 0 秒)
Hi, thanks for your work of this open source project! :) I am trying to use your code on some project and is stuck by a problem. The following are the parameters I used to test the program.
this.inRange = new ValueRange(BigInteger.ZERO, new BigInteger("2").pow(40));
this.outRange = new ValueRange(BigInteger.ZERO, new BigInteger("2").pow(41));
this.key = "key11"
The plaintext is new BigInteger("948980387264"); then the program enters into an endless while loop
of function hypergeometricHyp.
I checked the values within in the function and found this happened when Y = 1, inner = 0 and K = 0. K = 0, K -- will make it never run the break. And inner = 0, then Y will always be larger than 0.
Did you know how to fix this issue? Your help will be appreciated very much!
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.