Code Monkey home page Code Monkey logo

chainkit's People

Contributors

spartucus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chainkit's Issues

General question about your modified uECC library.

chainkit/Crypto/uECC.c

Lines 2810 to 2838 in aee9a63

int uECC_sign_forbc(const uint8_t private_key[uECC_BYTES],
const uint8_t message_hash[uECC_BYTES],
uint8_t signature[uECC_BYTES*2]){
uECC_word_t s[uECC_WORDS];
uECC_word_t r[uECC_WORDS];
uECC_word_t s3[uECC_WORDS];
vli_set(s3, curve_n);
vli_rshift1(s3);
int i = 0;
while(i<2000){
if(!uECC_sign(private_key, message_hash, signature)){
continue;
}
vli_bytesToNative(r, signature);
vli_bytesToNative(s, signature+uECC_BYTES);
if(vli_cmp(s, s3)>=0){
vli_modSub(s, curve_n, s, curve_n);
vli_nativeToBytes(signature+uECC_BYTES, s);
}
if(vli_numBits(r, uECC_WORDS)<256 && vli_numBits(s, uECC_WORDS)<256 && vli_numBits(r, uECC_WORDS)>248 && vli_numBits(s, uECC_WORDS) > 248){
return getRecId(private_key, message_hash, signature);
}
i++;
}
return -1;
}

Hi, I apologize if this this is out of line, but I've been playing around trying to understand EOS and crypto in general and I'm at the stage of trying to create / sign transaction and push to the block chain. Im using what looks like the same ecc library that you have here. uECC (micro-ecc), but I've noticed that you have added a few extra functions one being uECC_sign_forbc(. So my question is, will I need to do something similar or can I sign an EOS transaction using the already present uECC_sign( function. Im a swift developer so I have the micro-ecc library pulled into my swift project.

Any insight much appreciated :)

Thanks,
Jacob

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.