math,point,sage,elliptic-curve

Since you did not include code to reproduce your situation, I take an example curve from the Sage documentation: sage: E = EllipticCurve(GF(101),[23,34]) Generating random points You can repeatedly use random_element or random_point to choose points at random: sage: E.random_point() (99 : 92 : 1) sage: E.random_point() (27 : 80...

java,cryptography,elliptic-curve

There might be a more straightforward way but if you've got the EllipticCurve object, you can always just substitute the coordinates of your point into the equation of the curve.

If G(x,y) and P(x,y)are on a secure elliptic curve for ECC, the problem of solving k is called "elliptic curve discrete logarithm problem", or ECDLP. It is infeasible to find k on a secure elliptic curve. If you're not on such curve, enumerating all possible k and see if G=kP...

python,python-2.7,math,sage,elliptic-curve

I did a fresh install of Arch Linux and that fixed the problem. I'm guessing it probably had something to do with my python2/3 configuration.

javascript,elliptic-curve,sjcl

I found the mistake: ecc.elGamal is no standard sjcl function. I have to compile the sjcl.js file manually with additional functionality included. blog.peramid.es

java,cryptography,javacard,apdu,elliptic-curve

The problem is likely: pubKey.setW(apduBuffer, ISO7816.OFFSET_CDATA, ISO7816.OFFSET_LC); First of all, you should not use ISO7816.OFFSET_CDATA and ISO7816.OFFSET_LC directly. Use APDU.getOffsetCData for the location of the command data and use APDU.setIncomingAndReceive to get the Nc value (Lc is the encoding of the Nc value). Currently your code is failing as you...

c,cryptography,compiler-optimization,elliptic-curve,galois-field

The method outlined in fastgf2m.txt is for generating unrolled code associated with a fixed m value determined at compile time. The bmark program changes m at runtime, and so the unrolled code will often not be correct in this case. The documentation could be clearer on this point. Also make...

python,math,cryptography,elliptic-curve

There are a couple of issues here. First is that you have the wrong formulas: those are the formulas for the negation of the sum, or equivalently the third point of the curve that lies on the line through P and Q. Compare with the formula you linked to on...

elliptic-curve,jarsigner,jar-signing,ecdsa

Here is an answer: "Support for elliptic curves by jarsigner". To quote the conclusion: Support of elliptic curves by jarsigner depends on jarsigner itself and on the JRE configuration. There is no command-line option to list all supported curves....

java,cryptography,coordinates,coordinate-systems,elliptic-curve

The implementation above is correct there was an error in the Jacobian class (in the constructor) which update Z two times with a wrong value.

java,bouncycastle,privatekey,pem,elliptic-curve

The problem is not the PEMParser but JcaPEMKeyConverter which treats EC keys as keys for ECDSA: algorithms.put(X9ObjectIdentifiers.id_ecPublicKey, "ECDSA"); ... private KeyFactory getKeyFactory(AlgorithmIdentifier algId) throws NoSuchAlgorithmException, NoSuchProviderException { ASN1ObjectIdentifier algorithm = algId.getAlgorithm(); String algName = (String)algorithms.get(algorithm); ... The algorithm identifier is id-ecPublicKey, which is also used for ECDSA keys, so the...

java,bouncycastle,javacard,apdu,elliptic-curve

The public key returned in JavaCard is formatted as follows: 04 x y. In the terminal side, first you must extract x and y coordinates. Then, KeyFactory kf = KeyFactory.getInstance("ECDSA", "BC"); ECPoint point = new ECPoint(x, y); ECParameterSpec domainparameters = new ECParameterSpec(...); // initialize your domain parameters ECPublicKeySpec spec =...

java,cryptography,bouncycastle,elliptic-curve,key-pair

You need to get curve parameters in X9.62 format and convert them to JCE format X9ECParameters ecP = CustomNamedCurves.getByName("curve25519"); ECParameterSpec ecSpec=new ECParameterSpec(ecP.getCurve(), ecP.getG(), ecP.getN(), ecP.getH(), ecP.getSeed()); Then produce ECDSA key as normal Provider bcProvider = new BouncyCastleProvider(); KeyPairGenerator g = KeyPairGenerator.getInstance("ECDSA", bcProvider); g.initialize(ecSpec, new SecureRandom()); KeyPair keyPair = g.generateKeyPair(); Assert.assertNotNull(keyPair);...

java,android,public-key-encryption,elliptic-curve

This was an issue with the calculations causing a stack overflow. The repeated recursive division exceeded the call stack allocated to the process. I tried running it as an AsyncTask, but still the same issue. I got around this by spawning a new Thread with a lot more memory (64kb)...

bouncycastle,javacard,elliptic-curve,diffie-hellman

There is a problem in your implementation of KeyAgreement.ALG_EC_SVDP_DH in the terminal side. The correct length of output of the this method of key agreement should always be 20 bytes since SHA-1 is being performed on the derived output. So in your terminal side, you should perform SHA-1 after generating...

c++,public-key-encryption,crypto++,elliptic-curve

As jww suggested I have successfully completed encryption and decryption. Below are the code snippets if anyone wants. Decryption string decrypt(std::string encryptedMessage , std::string privateKeyExponent) { string decryptedMessage; try { AutoSeededRandomPool prng; //since the 'privateKeyExponent' is in base-64 format use Base64Decoder StringSource ss(privateKeyExponent, true /*pumpAll*/, new CryptoPP::Base64Decoder); Integer x; x.Decode(ss,...

php,encryption,https,elliptic-curve,diffie-hellman

client during the request creates a master key, which is then encrypted using server's public key and sent to server. This master key (as a plain text) is then used as a symmetric key for encrypting ongoing communication. Is this correct? Well, all-in-all, No. Because you are asking about...

java,cryptography,javacard,elliptic-curve

Your prime is not big enough. For curves over F(p) of 512 bit you should use 512 bit primes. Your first byte, (byte) 0x25, however starts with a hex digit 2. That means that the first byte first starts with 2 binary digits set to 0, meaning that you've defined...

java,security,cryptography,privatekey,elliptic-curve

Normally private key values are not printed to screen. Hence there is little sense to provide a toString() for ECPrivateKey (a sub-class of PrivateKey).Printing out private key values is of course not safe. It is of course possible to print out the secret part of the private key; printing out...