ig-crypto-utils/lib/ig-crypto-utils.rb
# for a 256-bit ECDSA curve, the uncompressed pubkey is 512 bits (256 bits of x, 256 bits of y, no sign bit).
# The compressed pubkey is 257 bits (256 bits of x, one bit of the sign of y).
for a 256-bit ECDSA curve, the uncompressed pubkey is 512 bits (256 bits of x, 256 bits of y, no sign bit).
The compressed pubkey is 257 bits (256 bits of x, one bit of the sign of y).
for a 256 - bit ECDSA curve the uncompressed pubkey is 512 bits ( 256 bits of x 256 bits of y no sign bit ) . The compressed pubkey is 257 bits ( 256 bits of x one bit of the sign of y ) .
def sign(encoded_data, encoded_private_key)
      group_name = 'secp256k1'
      decoded_data = Base64.decode64 encoded_data
      decoded_private_key = Base64.decode64 encoded_private_key
      curve = OpenSSL::PKey::EC.new(group_name)
      curve.private_key = OpenSSL::BN.new(decoded_private_key, 2)
      result = curve.dsa_sign_asn1 decoded_data
      Base64.encode64 result
    end
def sign ( encoded_data , encoded_private_key ) group_name = 'secp256k1' decoded_data = Base64 . decode64 encoded_data decoded_private_key = Base64 . decode64 encoded_private_key curve = OpenSSL :: PKey :: EC . new ( group_name ) curve . private_key = OpenSSL :: BN . new ( decoded_private_key , 2 ) result = curve . dsa_sign_asn1 decoded_data Base64 . encode64 result end
for a 256-bit ECDSA curve, the uncompressed pubkey is 512 bits (256 bits of x, 256 bits of y, no sign bit).
for a 256 - bit ECDSA curve the uncompressed pubkey is 512 bits ( 256 bits of x 256 bits of y no sign bit ) .
encoded_data
<not_specific>
encoded_private_key
<not_specific>