I hereby claim:
- I am icostan on github.
- I am icostan (https://keybase.io/icostan) on keybase.
- I have a public key ASDKtREJZfoZi1cp8-lpg7dO9i9g5mI02wnhtV3_1Qc7_Ao
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'csv' | |
CSV.open('bitwarden.csv', 'w') do |csv| | |
csv << ['folder', 'favorite', 'type', 'name', 'notes', 'fields', 'login_uri', 'login_username', 'login_password', 'login_totp'] | |
CSV.open('~/Desktop/pm_export.csv', headers: true).each do |row| | |
data = ['', 0, 'login', row['Title'], '', '', row['Login URL'], row['Login Username'], row['Login Password'], ''] | |
csv << data |
"If you can't explain it simply, you don't understand it well enough" - Einstein
RSA (Rivest-Shamir-Adleman) needs no introduction, it is well known and most used public-key cryptosystem that governs our digital lives.
Here is my take, a simple implementation in 10 lines of Ruby code that is neither the best implementation nor the most efficient one but is enough for the purpose of this article.
1 p = 7
2 q = 11
I just want to announce the very first release [v0.0.3] of Cryptos-ruby project, a simple and very easy to use Ruby API to manipulate multiple crypto coins.
For more information please check Github project page.
# require 'tmpdir' | |
RSpec.describe Cryptos::Bitcoin do | |
let(:to_address) { | |
Cryptos::Bitcoin::Address.new Cryptos::PublicKey.new Cryptos::PrivateKey.generate | |
} | |
before :all do | |
@cli = Cryptos::Connectors::Cli.new | |
@private_key = Cryptos::PrivateKey.generate |
This is Part 2 of 'The hard way - Bitcoin' series and I will start with 'the easy way' section first because even this gets a bit complex, then will continue with the hard stuff, crafting a Bitcoin transaction from scratch using basic math and cryptography.
We are going to generate private key, public key and Bitcoin testnet address to be used in this article.
This article is all about two ways of generating a Bitcoin address: the hard way using simple math and the easy way using an existing Bitcoin library.
In this section I am going to use simple math functions like addition and multiplication to generate a valid Bitcoin address starting from a number, the private key and calculating everything all the way up to public key and final Bitcoin address.
require 'digest' | |
# | |
# secp256k1 domain parameters | |
# | |
G = '0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8' | |
Gx = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798 | |
Gy = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8 | |
puts "Base point: #{G}" | |
puts "Base point X coordinate: #{Gx.to_i}" |