ECDSA: Sign / Verify - Examples · Practical Cryptography ...

Implemented LNURL-auth in Python to learn about LNURL and ECDSA (x-post from /r/Bitcoin)

Implemented LNURL-auth in Python to learn about LNURL and ECDSA (x-post from /Bitcoin) submitted by ASICmachine to CryptoCurrencyClassic [link] [comments]

I made a pure python implementation of RSA/ECDSA/bitcoin address creation

submitted by imatwork2017 to crypto [link] [comments]

A brief of QRL

Quantum Resistant Ledger(QRL)is a blockchain network which is designed to resist quantum attacks. The founder of QRL, Peter Waterland is one of the earliest group of people who have worryies about the safty of Bitcoin, Etherreum and other blockchain network which use ECDSA or similar algorithums.
With the developement of the quantum computing technologies, the encryption algorithums of these cryptocurrencies will have no effect someday in the future for sure.
QRL figured out a way to slove this problem, it uses a hash-based eXtended Merkle Tree Signature Scheme (XMSS) to encrypt the message. To make a long story short, QRL utilitize the cryptographic method with minimum security requreiment that rely only upon on the collision resistance of cryptographic hash function. the hash-based digital signature scheme is generated from such function. Such signartue is called one time signatures(OTS), which could only be safely used for one time in encrypt the message, so for each address QRL use many OTS which is generated by a binary hash tree, also know as Merkle Tree.
QRL is programmed with python and The total amount of QRL token is 105,000,000. Now the QRL ranked No. 62 in miningpoolstatus.stream. It also allows developers to easily build applications on its platform.
Official Website: https://theqrl.org/
Block Browser: https://explorer.theqrl.org/
Mining software: Xmirg
Operating system: Windows, Linux
Mining equipment: CPU
Mining tutorial: https://www.dxpool.com/help/en/qrl-mining-tutorial
submitted by DxPool-official to QRL [link] [comments]

Electrum 3.2 (codename: Satoshi's Vision) has been officially released. It includes libsecp256k1 and the Revealer plugin.

Electrum 3.2 (codename: Satoshi's Vision) has been officially released. It includes libsecp256k1 and the Revealer plugin. submitted by BashCo to Bitcoin [link] [comments]

Bottos 2020 Research and Development Scheme

Bottos 2020 Research and Development Scheme

https://preview.redd.it/umh8ivbsua841.png?width=554&format=png&auto=webp&s=5c16d9d9e61503e4c9d44212eecd176eda11550a
As 2020 is now here, Bottos has solemnly released its “2020 Research and development scheme”. On one hand, we adhere to the principle of transparency so that the whole community can comprehend our next step as a whole, but more importantly, it also helps our whole team to think deeply about the future and reach consensus. It is strongly believed that following these consistent follow-ups will help us to in order to achieve the best results.
Based on the efficient development of Bottos, the team’s technical achievements in consensus algorithms and smart contracts are used to deeply implement and optimize the existing technical architecture. At the same time using the community’s technical capabilities, horizontal development, expanding new functional modules and technical directions it stays closely integrated with the whole community.
In the future, we will keep on striving to achieve in-depth thinking, comprehensive planning, and flexible adjustment.


Overview of Technical Routes

https://preview.redd.it/rk9tpg2uua841.png?width=554&format=png&auto=webp&s=77e607b81f31c0d20feaa90eca81f09a23addca4
User feedback within the community is the driving force behind Bottos progress. In the development route of the community and industry we have formulated a roadmap for technical development, pointing out the right path for the team towards the right direction among the massive routes of modern technology.
As part of our 2020 research and development objective we have the following arrangements:
1. Intensifying enormous number of smart contracts and related infrastructures
After many years of development, smart contracts have gradually become the core and standard function in blockchain projects. The strength of smart contracts, ease of use, and stability represent the key capabilities of a blockchain project. As a good start, Bottos has already made great progress in the field of smart contracts. In smart contracts we still need to increase development efforts, making the ease of use and stability of smart contracts the top priority of our future development.
Reducing the barriers for developers and ordinary users to use, shortening the contract development cycle and saving users time is another important task for the team to accomplish. To this end, we have planned an efficient and easy-to-use one-stop contract development, debugging, and deployment tool that will provide multiple access methods and interfaces to the test network to support rapid deployment and rapid debugging.
2. Establishing an excellent client and user portal
The main goal here is to add an entrance point to the creation and deployment of smart contracts in the wallet client. To this end, the wallet needs to be transformed, a local compiler for smart contracts must be added, and an easy-to-use UI interface can be provided for the purpose of creating, deploying, and managing contracts to meet the needs of users with a single mouse click only.
3. Expanding distributed storage
Distributed storage is another focus of our development in the upcoming year. Only by using a distributed architecture can completely solve the issue of performance and scalability of stand-alone storage. Distributed storage suitable for blockchain needs to provide no less than single machine performance, extremely high availability, no single point of failure, easy expansion, and strong consistent transactions. These are the main key points and difficulties of Bottos in field of distributed storage in the upcoming days.
4. Reinforcing multi party secured computing
Privacy in computing is also a very important branch to deal with. In this research direction, Bottos has invested a lot of time and produced many research results on multi-party secured computing, such as technical articles and test cases. In the future, we will continue to give efforts in the direction of multi-party secured computing and apply mature technology achievements into the functions of the chain.

2020 Bottos — Product Development

Support for smart contract deployment in wallets
The built-in smart contract compiler inside the wallet supports compilation of the smart contracts in all languages provided by Bottos and integrates with the functions in the wallet. It also supports one-click deployment of the compiled contract source code in the wallet.
When compiling a contract, one can choose whether to pre-execute the contract code. If pre-execution is selected, it will connect to the remote contract pre-execution service and return the execution result to the wallet.
When deploying a contract, one can choose to deploy to the test network or main network and the corresponding account and private key of the test network or main network should be provided.

2020 Bottos-Technical Research

https://preview.redd.it/x2k65j7xua841.png?width=553&format=png&auto=webp&s=a40eae3c56b664c031b3db96f608923e670ff331
1. Intelligent smart contract development platform (BISDP)
The smart contract development platform BISDP is mainly composed of user-oriented interfaces, as well as back-end compilation and deployment tools, debugging tools, and pre-execution frameworks.
The user-oriented interface provides access methods based on WEB, PC, and mobile apps, allowing developers to quickly and easily compile and deploy contracts and provide contract template management functions. It can also manage the contract remotely by viewing the contract execution status, the consumed resources and other information.
In the compilation and deployment tool a set of smart contract source code editing, running, debugging, and deployment solutions as well as smart contract templates for common tasks are provided, which greatly reduces the threshold for developers to learn and use smart contracts. At the same time, developers and ordinary users are provided with a smart contract pre-execution framework, which can check the logical defects and security risks in smart contracts before actual deployment and promptly remind users a series of problems even before the smart contracts are actually run.
In the debugging tool, there are built-in local debugging and remote debugging tools. Multiple breakpoints can be set in the debugging tool. When the code reaches the breakpoint, one can view the variables and their contents in the current execution stack. One can also make conditional breakpoints based on the value of the variable. The code will not execute until the value reaches a preset value in memory.
In the pre-execution framework, developers can choose to pre-execute contract code in a virtual environment or a test net, checking out problems in some code that cannot be detected during compilation time and perform deeper code inspection. The pre-execution framework can also prompt the user in advance about the time and space resources required for execution.
2. Supporting Python and PHP in BVM virtual machine for writing smart contracts
We have added smart contract writing tools based on Python and PHP languages. These languages can be compiled into the corresponding BVM instruction set for implementation. These two reasons are used as the programming language for smart contracts.
For the Python language, the basic language elements supported by the first phase are:
- Logic control: If, Else, Eli, While, Break, method calls, for x in y
- Arithmetic and relational operators: ADD, SUB, MUL, DIV, ABS, LSHIFT, RSHIFT, AND, OR, XOR, MODULE, INVERT, GT, GTE, LT, LTE, EQ, NOTEQ
-
Data structure:
- Supports creation, addition, deletion, replacement, and calculation of length of list data structure
- Supports creation, append, delete, replace, and calculation of length of dict data structure
Function: Supports function definition and function calls
For the PHP language, the basic language elements supported by the first phase are :
- Logic control: If, Else, Eli, While, Break, method calls
- Arithmetic and relational operators: ADD, SUB, MUL, DIV, ABS, LSHIFT, RSHIFT, AND, OR, XOR, MODULE, INVERT, GT, GTE, LT, LTE, EQ, NOTEQ
Data structure:
- Support for creating, appending, deleting, replacing, and calculating length of associative arrays
Function: Supports the definition and calling of functions
For these two above mentioned languages, the syntax highlighting and code hinting functions are also provided in BISDP, which is very convenient for developers to debug any errors.
3. Continuous exploration of distributed storage solutions
Distributed storage in blockchain technology actually refers to a distributed database. Compared with the traditional DMBS, in addition to the ACID characteristics of the traditional DBMS, the distributed database also provides the high availability and horizontal expansion of the distributed system. The CAP principle of distributed system reveals that for a common distributed system there is an impossible triangle, only two of them can be selected among its three directions, consistency, availability, and partition fault tolerance. Distributed databases in China must require strong consistency. This is due to the characteristics of the blockchain system itself, because it needs to provide reliable distributed transaction capabilities. For these technical issues, before ensuring that the distributed storage solution reaches 100% availability, we will continue to invest more time and technical strength, do more functional and performance testing, and conduct targeted tests for distributed storage systems.
4. Boosting secured multi-party computing research and development
Secured multi-party Computing (MPC) is a cryptographic mechanism that enables multiple entities to share data while protecting the confidentiality of the data without exposing the secret encryption key. Its performance indicators, such as security and reliability are important for the realization of the blockchain. The transparent sharing of the data privacy on the distributed ledger and the privacy protection of the client wallet’s private key are truly essential.
At present, the research and development status of the platform provided by Bottos in terms of privacy-enhanced secured multi-party computing is based on the BIP32 / 44 standard in Bitcoin wallets to implement distributed management of client wallet keys and privacy protection.
Considering the higher level of data security and the distributed blockchain account as the public data of each node, further research and development are being planned on:
(1) Based on RSA, Pailliar, ECDSA and other public key cryptosystems with homomorphic attributes, as well as the GC protocol, OT protocol, and ZKP protocol to generate and verify transaction signatures between two parties;
(2) Introduce the international mainstream public key system with higher security and performance, national secret public key encryption system, and fewer or non-interactive ZKP protocols to achieve secured multi-party computing with more than two parties, allowing more nodes to participate Privacy protection of ledger data.

Summary

After years of exploration, we are now full of confidence in our current research and development direction. We are totally determined to move forward by continuous hard work. In the end, all members of Bottos also want to thank all the friends in the community for their continuous support and outstanding contributions. Your certainty is our greatest comfort and strongest motivation.

Be smart. Be data-driven. Be Bottos.
If you aren’t already in our group, please join now! https://t.me/bottosofficial
Join Our Community and Stay Updated!
Bottos Website | Twitter |Facebook | Telegram | Reddit
submitted by BOTTOS_AI to Bottos [link] [comments]

Keychain Accelerates Enterprise Blockchain Adoption with Bitcoin Data Security and Identity Layer

FYI
http://www.keychain.io/2019/09/04/1685/
Uses the Bitcoin blockchain as a public key infrastructure to secure off-chain data.
Capabilities:
Features:
Targeted sectors:
submitted by recursivesalt to u/recursivesalt [link] [comments]

python-ecdsa 0.9 released (includes secp256k1 and RFC6979)

https://github.com/warnepython-ecdsa
Brian Warner made a new significant 0.9 release of python-ecdsa. Last release was 2 years ago. Library now includes secp256k1 curve by default (the one used in Bitcoin) as well as deterministic signing described in RFC6979. Time to cleanup Python software wallets (e.g. Electrum) :-)
submitted by stickac to Bitcoin [link] [comments]

More reddit analysis for fun

So most of you guys know my last data digging through the rBtc and rBitcoin subreddits (the BTCSRs from here on) showing nicely how nullc decided to increase use of the term 'Bitcoin's creator' in place of 'Satoshi' in recent times and thereby confirming drwasho's intuitive suspicion.
Now, given the success of this investigation, I was wondering whether I could generalize this approach to dig through user histories to try to find more such interesting terms. I see this is mostly a fun exercise that might show further suspicious or even just interesting or funny things about us.
So here's my method: I use the BTCSRs and the same date range (2009 - Oct 31st 2016) as above.
The general method is to look at bigram (pairs of word) statistics for a certain user vs. the rest of the BTCSR data.
To count bigrams, I take a comment, remove quoted text from comments, replace the characters ',;.!?' with spaces and then split the lowercased result by using the python string.split(..) method and then count pairs of adjacent such tokenized words. The analysis turns out to be somewhat sensitive to the tokenization used; I think the basic approach is fine but if someone has a great I idea on how to improve this, I am all ears.
I first count bigrams of the whole BTCSR.
I then take a user (from a random selection of users that just came to mind and while looking through the last submissions here on rBtc) and count the bigram frequency distribution for that user and all his comments.
I then look for those bigrams that fulfil the following two criterions:
I then sort the resulting set of terms according to maximum ratio user_frequency / total_frequency (highest first) and print it (up to the first 20).
For those wondering why the numbers for Greg don't exactly match his 'Bitcoin's creator' example, it should be noted that the number of terms are slightly different to my last analysis. Among other things, this is due to:
I think the results below are interesting and I can certainly see my own pet peeves reflected in this analysis, as well as some common talking points by others :-) It also nicely exposes the 'Bitcoin' creator' thing again. But decide for yourself. If you want your name added to this list, just reply and ask. So here we go:
Terms of interest by nullc, term, user count, total count, fraction:
 bitcoin's creator 133 200 0.67 block relay 100 350 0.29 fast block 47 183 0.26 the system's 66 270 0.24 bip 109 37 152 0.24 elements alpha 32 162 0.20 doubly so 20 102 0.20 competing systems 20 103 0.19 majority hashpower 23 120 0.19 round trip 36 189 0.19 signature validation 29 153 0.19 is untrue 44 235 0.19 lite clients 30 170 0.18 p2p protocol 38 219 0.17 a specification 27 159 0.17 security properties 16 103 0.16 the bloom 23 150 0.15 not validating 19 124 0.15 consensus changes 17 111 0.15 utxo bloat 15 100 0.15 
by myself awemany:
 utxo commitments 50 166 0.30 the 32mb 32 125 0.26 32mb limit 22 108 0.20 tunnel vision 20 102 0.20 on blocksize 43 261 0.16 note also 24 148 0.16 different jurisdictions 16 107 0.15 of greg 14 103 0.14 gavin's proposal 38 285 0.13 with n 14 105 0.13 per node 19 146 0.13 emphasis mine 16 123 0.13 payment hubs 17 140 0.12 block transmission 12 106 0.11 group think 16 144 0.11 blocksize cap 65 592 0.11 physical limits 11 102 0.11 crippling the 18 168 0.11 on bct 18 169 0.11 hard cap 59 554 0.11 
mike_hearn:
 bloom filtering 24 126 0.19 
jstolfi:
 the queues 82 100 0.82 the "fee 213 315 0.68 relay nodes 243 409 0.59 "fee market" 307 580 0.53 000 | 74 144 0.51 the 21inc 56 115 0.49 total hashpower 73 161 0.45 the cartel 204 476 0.43 branch will 50 119 0.42 traffic will 42 102 0.41 overlay network 41 103 0.40 clients who 114 291 0.39 that clients 41 110 0.37 block n 42 114 0.37 speculative trading 53 154 0.34 bit shares 53 155 0.34 ditto for 43 129 0.33 the bip66 34 116 0.29 gambling game 30 104 0.29 ln payment 37 131 0.28 
aminok:
 broadband connection 43 108 0.40 txs per 28 105 0.27 txs that 42 161 0.26 throwaway accounts 39 154 0.25 tx data 26 105 0.25 core contributors 43 179 0.24 txs to 38 164 0.23 bitcoin main 32 147 0.22 cryptocurrency market 26 139 0.19 5 percent 34 182 0.19 digital scarcity 39 214 0.18 bandwidth growth 19 106 0.18 real account 24 134 0.18 8 gb 44 247 0.18 transactional currency 35 198 0.18 on trusted 30 172 0.17 the sc 26 153 0.17 of txs 46 273 0.17 limit needs 18 108 0.17 shorter block 28 169 0.17 
finway:
 fake coins 12 100 0.12 
ferretinjapan:
 claimed i 22 102 0.22 vast number 19 114 0.17 refund transaction 25 162 0.15 risk more 33 234 0.14 watching only 17 124 0.14 actual fact 14 103 0.14 in cs 13 100 0.13 and jon 13 101 0.13 blockstream core 99 797 0.12 heaps of 21 171 0.12 no-one will 15 124 0.12 no-one is 32 272 0.12 quite certain 18 157 0.11 blockchain security 16 141 0.11 i've followed 14 124 0.11 decentralised network 16 144 0.11 and though 28 257 0.11 in earnest 14 129 0.11 0 https://bitcointalk 17 162 0.10 no-one can 19 184 0.10 
cypherdoc2:
 php topic=68655 65 136 0.48 b/c they 53 130 0.41 b/c the 37 101 0.37 b/c it 39 129 0.30 b/c of 68 225 0.30 the sc 45 153 0.29 https://bitco in/forum/threads/gold-collapsing-bitcoin-up 56 198 0.28 75% discount 18 104 0.17 profit company 25 145 0.17 the ppl 19 114 0.17 the mainchain 42 266 0.16 the gfc 20 166 0.12 on bct 19 169 0.11 ppl who 20 192 0.10 most ppl 12 116 0.10 small blockists 18 175 0.10 of ppl 17 170 0.10 
todu:
 75 % 124 174 0.71 100 % 55 199 0.28 usd verify 32 123 0.26 flexible transactions 44 170 0.26 mb hard 47 189 0.25 mb blocksize 38 154 0.25 usd / 62 252 0.25 1 75 43 182 0.24 core project 47 217 0.22 wladimir van 27 128 0.21 big blocker 36 189 0.19 10 % 29 158 0.18 a spinoff 23 128 0.18 jihan wu 30 188 0.16 big blockers 95 605 0.16 5 % 25 160 0.16 ln hub 41 263 0.16 small blocker 36 237 0.15 fork code 24 158 0.15 blockstream / 19 130 0.15 
dskloet:
 in submissions 45 173 0.26 no referral 49 231 0.21 referral links 54 451 0.12 begging/asking for 19 180 0.11 
ForkiusMaximus:
 blocksize cap 117 592 0.20 a spinoff 25 128 0.20 of dev 17 106 0.16 schelling point 23 145 0.16 bitcoin's ledger 17 116 0.15 21m coin 19 145 0.13 new ledger 14 120 0.12 bitcoin ledger 34 335 0.10 
realistbtc:
 / core 14 124 0.11 blockstream / 14 130 0.11 : https://www 26 255 0.10 
BitcoinXio:
 free coins 31 290 0.11 
smartfbrankings:
 entry credits 44 251 0.18 rube goldberg 20 123 0.16 was censored 22 148 0.15 note: this 26 201 0.13 get orphaned 32 266 0.12 lol @ 55 532 0.10 
theymos:
 by full 35 183 0.19 max block 286 2134 0.13 bitcoin experts 33 257 0.13 rules no 14 117 0.12 lightweight clients 20 175 0.11 invalid chain 15 135 0.11 btc coin 12 109 0.11 with pruning 13 125 0.10 initial sync 26 255 0.10 
sfultong:
 bitcoin's ledger 12 116 0.10 
BashCo:
 to /changetip 116 131 0.89 satoshis changetip 316 539 0.59 daily thread 53 115 0.46 upvotes changetip 63 157 0.40 100000 satoshis 36 103 0.35 changetip tip 37 117 0.32 10 upvotes 38 133 0.29 tip it 144 513 0.28 that mods 29 115 0.25 deterministic seed 23 100 0.23 mbtc changetip 41 201 0.20 400 bits 60 309 0.19 thread](https://www reddit 36 208 0.17 changetip private 248 1489 0.17 moronic monday 24 151 0.16 comments which 17 113 0.15 it forward 185 1249 0.15 answer changetip 15 107 0.14 a giveaway 17 126 0.13 to subscribe 63 473 0.13 
luke-jr:
 spam filtering 44 125 0.35 addresses don't 35 177 0.20 ecdsa private 18 100 0.18 consented to 21 119 0.18 spam filters 19 111 0.17 8 peers 17 102 0.17 since 0 18 108 0.17 hardforks are 32 202 0.16 addresses do 17 123 0.14 hardfork in 27 198 0.14 light clients 35 271 0.13 consensus systems 22 180 0.12 the centralised 15 127 0.12 consensus protocol 28 249 0.11 their spam 12 112 0.11 require consensus 13 125 0.10 hardfork would 12 117 0.10 on trusting 16 157 0.10 signed messages 17 167 0.10 
Noosterdam:
 bitcoin's ledger 27 116 0.23 new ledger 24 120 0.20 blocksize cap 84 592 0.14 wide ledger 17 123 0.14 21m coin 17 145 0.12 
Lejitz:
 cap increase 86 209 0.41 urgency to 40 120 0.33 that wright 67 359 0.19 cap increases 18 102 0.18 support both 38 234 0.16 the urgency 27 180 0.15 wright is 115 826 0.14 reasonable doubt 59 459 0.13 he supposedly 14 110 0.13 block cap 23 186 0.12 people believing 12 109 0.11 into irrelevance 11 100 0.11 to bolster 17 169 0.10 
pekatete:
 missing transactions 24 103 0.23 
pb1x:
 active developers 29 101 0.29 try localbitcoins 91 446 0.20 white list 22 112 0.20 mission of 26 142 0.18 rate limit 29 173 0.17 try electrum 24 150 0.16 $0 03 31 194 0.16 rate limited 19 124 0.15 the mission 35 243 0.14 try circle 28 203 0.14 favor a 14 105 0.13 reuse an 13 108 0.12 around $0 22 186 0.12 42 million 13 110 0.12 lite clients 20 170 0.12 fiat exchanges 16 139 0.12 don't decide 15 134 0.11 $0 04 17 160 0.11 
No results found for gavinandresen, pwuille, raisethelimit, digitsu, Egon_1, ThomasZander, deadalnix, randy-lawnmole, Windowly, BeijingBitcoins, Helvetian616, BiggerBlocksPlease, 8btccom, saddit42, jessquit, KillerHurds, thestringpuller, MeTheImaginaryWizard, Leithm, steb2k, Matthew-Davey, s1ckpig, thezerg, redlightsaber.
submitted by awemany to btc [link] [comments]

gRPC LND Python Problem

I am currently struggling to work myself through gRPC with my LND Node using Python.
I've set everything up using this tutorial.
Getinfo works as described in the tutorial.
Now I created an invoice with Starblocks but struggle to get my head around how to satisfy it using a script.
My script:
import rpc_pb2 as ln import rpc_pb2_grpc as lnrpc import grpc import os # Due to updated ECDSA generated tls.cert we need to let gprc know that # we need to use that cipher suite otherwise there will be a handhsake # error when we communicate with the lnd rpc server. os.environ["GRPC_SSL_CIPHER_SUITES"] = 'HIGH+ECDSA' # Lnd cert is at ~/.lnd/tls.cert on Linux and # ~/Library/Application Support/Lnd/tls.cert on Mac cert = open(os.path.expanduser('/home/pi/.lnd/tls.cert'), 'rb').read() creds = grpc.ssl_channel_credentials(cert) channel = grpc.secure_channel('localhost:10009', creds) stub = lnrpc.LightningStub(channel) import codecs # Lnd admin macaroon is at ~/.lnd/data/chain/bitcoin/simnet/admin.macaroon on Linux and # ~/Library/Application Support/Lnd/data/chain/bitcoin/simnet/admin.macaroon on Mac with open(os.path.expanduser('/home/bitcoin/.lnd/data/chain/bitcoin/testnet/invoice.macaroon'), 'rb') as f: macaroon_bytes = f.read() macaroon = codecs.encode(macaroon_bytes, 'hex') metadata = [('macaroon',macaroon)] invoice_response = stub.AddInvoice("lnt...",metadata=metadata) payment_request = invoice_response.payment_request for payment in stub.SendPayment(payment_request): print(payment) 
Note that I've shorted the invoice code (first parameter) from Starblocks in the function "AddInvoice"

I am totally lost right now as I work myself through this file and this documentation to see which functions are available and expect which parameters. Someone stated that I would have to use the macaroon in "AddInvoice" and I don't even know why or what that is.

I try to setup two nodes in the future to create and pay invoices of each other to stresstest the speed of routing and the payment itself. I know this has been done before but I need that data from my own test for an exam.
Sorry to bother you and I would read myself into it but the data is due in two days and the stress is not helping me understand.
(Damn procrastination)
Thanks guys!
€: sendpayment via shell is no problem at all!
submitted by snt1991 to lightningnetwork [link] [comments]

Nice Article About How HPB Perform Vs EOS (and so ETH)

HPB: Unique Blockchain Infrastructure
Now most public chains will mention that the problem of tps development is the problem of the blockchain. This is also because the traditional blockchain has the problem of poor performance. In order to reach consensus, the efficiency is sacrificed. But if you want to build an ecosystem of countless DAPPs based on the public chain, there is no guarantee of performance that is almost impossible.
The dream of building a DAPP ecosystem is that Bitcoin has not been completed and it is not necessary to complete it. Bitcoin is only a digital currency and it has initially fulfilled its historical mission. It has become a value storer, and it has opened the world of the blockchain. .
Ethereum started with the goal of building a world-wide computer that provided the infrastructure for building decentralized applications, but so far it has only succeeded in the crowdfunding field. Due to performance, cost, scalability, and other issues, it is not yet possible to become a DAPP infrastructure. By the end of 2017, a simple encrypted cat game would have caused Ethereum to jam. Ethereum tried to get rid of the predicament through techniques such as fragmentation, Plasma, and PoS consensus.
Newcomers, such as EOS, are highlighting their high performance, emphasizing the possibility of reaching mega-level tps. Then, in the future, an infrastructure is needed to build a prosperous DAPP ecosystem on this decentralized infrastructure to meet the user or business needs of different scenarios.
What kind of program is a better choice? This is what blue fox has been paying attention to. Blue Fox focuses on an HPB blockchain project that uses a completely different search path than other public chains or infrastructure. This path is worth paying attention to all the buddies who pay attention to the blockchain.
This path is a combination of hardware and software. It is more demanding and the practice is more difficult. However, if it is truly grounded, it may be a good path.
HPB to become a high-performance blockchain infrastructure
Whether HPB or EOS have the same goals, they must provide a high-performance infrastructure for the decentralized ecosystem. why? Mainly from the blockchain to the mainstream business scene point of view. The current blockchain has achieved some success in security and decentralization, but there are natural constraints in terms of efficiency. This hinders its application scenario to the mainstream.
This is also a direction that Blockchain 3.0 has been exploring. Through higher performance, lower costs, and better scalability to meet the needs of more decentralized application scenarios.
The current bitcoin and Ethereum's throughput are both worrying. Bitcoin supports about 7 transactions per second on average, and Ethereum has about 15 throughputs. If you make the block bigger, you can also increase the throughput, but it will cause the problem of block bloat. Last year, an encrypted cat game made everyone see the blockchain congestion problem. From a performance point of view, it takes a long time for blockchains to reach the mainstream.
In addition to the lack of tps performance, the transaction cost of the blockchain is high. Both ordinary users and developers cannot afford gas costs that are too high. For example, before Ethereum's crypto-games became hot, there were even transaction fees compared to encrypted cats. It is also expensive.
The HPB and EOS goals are similar, but their paths are completely different. HPB uses a combination of hardware and software, has its own dedicated chip hardware server, which makes it theoretically have higher performance.
HPB is also trying to create an operating system architecture that can build applications. This architecture includes accounts, identity and authorization management, policy management, databases, asynchronous communications, program scheduling on CPUs, FPGAs, or clusters, and hardware accelerated technology. Realizes low delay and high concurrency and realizes mega-level tps to meet the needs of commercial scenarios.
It is different from EOS. Its architecture, in addition to its software architecture and its hardware architecture, is a combination of hardware and software blockchain architecture that combines high-performance computing and cloud computing concepts. The hardware system includes a distributed core node composed of high performance computing hardware, a general communication network, and a cloud terminal supported by high performance computing hardware.
The core node supports a standard blockchain software architecture, including consensus algorithms, network communications, and task processing. It also introduces a hardware acceleration engine. It works with software to achieve high-performance tps through BOE technology (Blockchain Offload Engine) and consensus algorithm acceleration, data compression, and data encryption.
BOE makes HPB unique
In the HPB's overall architecture, compared with other blockchain infrastructures, there are obvious differences. One of the important points is its BOE technology.
BOE mentioned above, is the blockchain offload engine. The BOE engine includes BOE hardware, BOE firmware, and matching software systems. It is a heterogeneous processing system that achieves high performance and high concurrent computational acceleration by combining CPU serial capabilities with the parallel processing capabilities of the FPGA/ASIC chip.
In the process of parsing TCP packets and UDP packets, the BOE module does not need to participate in the CPU, which can save CPU resources. The BOE module performs integrity checking, signature verification, and account balance verification on received messages such as transactions and blocks, performs fragment processing on large data to be transmitted, and encapsulates the fragments to ensure the integrity of received data. At the same time, statistics work will be performed according to the received traffic of the TCP connection, and corresponding incentives will be provided according to the system contribution.
BOE has played its own role in signature verification speed, encryption channel security, data transmission speed, network performance, and concurrent connections.
The BOE acceleration engine embeds the ECDSA module. The main purpose of this module is to improve the speed of signature verification. ECDSA is also an elliptic curve digital signature algorithm. Although it is a mature algorithm that is widely used at present, the pure software method can only be performed thousands of times per second and cannot meet the high performance requirements. So the combination of BOE and ECDSA is a good attempt.
In the process of data transmission between different nodes, BOE needs to establish an encrypted channel. In this process, it uses a hardware random number generator to implement the security of the encrypted channel, because the seed of the random number of the key exchange becomes unpredictable.
The BOE acceleration engine also uses block data fragmentation broadcasting technology. Block fragmentation includes a complete block header, which facilitates the broadcast of newly generated blocks to all nodes. With block data fragmentation, network data can be quickly transmitted between different nodes.
The BOE technology can perform traffic statistics of node connections based on hardware, and can calculate network bandwidth data provided by different nodes. Only providing network bandwidth to the system will have the opportunity to become a high contribution value node. In this way, incentives for the contribution of the nodes are provided.
In terms of concurrency, BOE is expected to maintain more than 10,000 TCP sessions and handle 10,000 concurrent sessions through an acceleration engine. BOE's dedicated parallel processing hardware replaces the traditional software serial processing functions such as transaction data broadcasting, unverified blockwide network broadcasting, transaction confirmation broadcasting, and the like.
According to HPB estimates, through the BOE acceleration engine, the session response speed and the number of session maintenance can reach more than 100 times the processing power of the common computing platform node. If the actual environment can be achieved, it is a very significant performance improvement.
Consensus algorithm for internal and external bi-level elections
HPB not only significantly improves performance through BOE, but also adopts a dual-layer internal and external voting mechanism in consensus algorithms. It attempts to achieve more efficient consensus efficiency on the premise of ensuring security and privacy.
Outer election refers to the selection of high-contribution-value node members from many candidate nodes, and the election will use node contribution value evaluation indicators. Inner-layer election refers to an anonymous voting mechanism based on a hash queue. When a block is generated, it calculates which high-contribution value node preferentially generates a block. Nodes with high priority have the right to generate blocks preferentially.
So, how to choose high contribution value node? Here is the first indicator to evaluate the contribution value. The indicators include whether a BOE acceleration engine is configured, network bandwidth contribution (data throughput over a fixed period of time), reputation, and total node token holding time. Among them, the creditworthiness of the node is obtained through the analysis of participating transactions and data analysis such as packaged blocks and transaction forwarding. The total holding time of the node token can be obtained by real-time statistics on the account information.
The outer election adopts an adaptive and consistent election plan. That is, by maintaining the consistency of “books” to ensure the consistency of outer elections, this can reduce network synchronization, and can also use the data of each node on the chain. The first is to put the above-mentioned four evaluation indicators into the block. By keeping the account books consistent, you can calculate the current ranking of all the participating candidate nodes. The higher-ranking high-contribution value nodes will become the official high contribution in the next round. Value node.
With the formal high contribution value node, the goal of the inner election is to find the high contribution value node corresponding to each block as soon as possible. The entire process is divided into three phases: nominations, statistics, and calculations. These three phases combine security, privacy, and performance.
The first is the nomination. At the beginning of the voting period, the BOE acceleration engine generates a random Commit. The high contribution value node submits its Commit, and the Commit synchronizes with the chain generated by the high-performance node. After the voting period is over, the Commit in the blockchain is started and the ticket pool is created. The last is the calculation. The calculation is mainly based on the weight algorithm to calculate the node's generation priority in the block. Generate the highest-priority high-contribution value node and obtain the block package right.
Other nodes can verify the random number and address signature according to the principle of verifiable random function, which not only guarantees security, but also guarantees the unpredictability and privacy of high contribution value nodes.
In general, HPB's consensus algorithm combines security, privacy, and speed through a combination of hardware and software. Using the BOE acceleration engine to generate random numbers, contribution value evaluation indicators, coherence ledgers, anonymous voting mechanisms, weight algorithms, signature verification, etc., privacy, reliability, security, and high efficiency are achieved.
Universal virtual machine design: support for different blockchains
The HPB virtual machine adopts a plug-in design mechanism and can support multiple virtual machines. It can implement the combination of the underlying virtual machine and upper level program language translation and support, and support the basic application of virtual machines. In addition, the external interface of the virtual machine can be realized through customized API operations, which can interact with the account data and external data.
The advantage of this mechanism is that it can realize the high performance of native code execution when the smart contract runs, and it can also implement the common virtual machine mechanism supporting different blockchains. For example, it can support Ethereum virtual machine EVM. The smart contract on EVM can also be used on HPB.
Neo's virtual machine NeoVM can also be used on HPB. When high-performance scenarios are needed, users of both EVM and NeoVM need only a few adaptations to interact with other HPB applications.
The HPB smart contract has also made some improvements, such as the management of the life cycle, auditing and forming a common template. No progress can realize the full lifecycle management of smart contracts, such as the complete and controllable process management and integration rights management mechanism for intelligent contract submission, deployment, use, and logout.
In smart contract auditing, HPB conducts a protective audit that combines automated tool auditing with professional code design. In terms of templates, HPB gradually formed a generic smart contract template to support the flexible configuration of various common business scenarios.
Incentives for a positive cycle of token economy
When the high-contribution value node generates a block, it will receive a token reward from the system. From the design of the HPB, the system will issue a token of no more than 6% per year, and the additional token will be proportional to the total number of high-contribution nodes and candidate nodes.
In order to obtain the token reward from the system, it must first become a high contribution value node, and only the high contribution value node has the right to generate a block.
In order to obtain the right to generate a block, it is necessary to contribute, including holding a certain number of HPB tokens, having a BOE hardware acceleration engine, and contributing network bandwidth to the system.
From its mechanism, we can see that HPB's token economic system design is considered from the formation of a positive incentive system. It maintains the overall HPB system by holding the HPB token, having a BOE hardware acceleration engine, and contributing network bandwidth to the system. safe operation.
HPB landing: supports a variety of high-frequency scenes
In essence, HPB is a high-performance blockchain platform and is an infrastructure where various blockchain applications can be explored. Including blockchain finance, blockchain games, blockchain entertainment, blockchain big data, blockchain anti-fake tracking, blockchain energy and many other fields.
In terms of finance, decentralized lending, decentralized asset management, etc. can all be built on the HPB platform to meet high-frequency lending and transaction scenarios.
In terms of games, although all game operations are not practical, the up-chaining and trading of assets such as game props are important scenes. Once the realization of the game product chain, you can ensure that the game assets are transparent, unique, can not be tampered with, never disappeared, etc., providing great convenience for the transaction between the game products.
Compared with traditional centralized service providers, there are many advantages. For example, there is no need to worry about the loss, confiscation, or change of virtual game products. The transaction process is also simple and convenient. Since HPB has a high-performance blockchain, it is expected to support millions of concurrents, and many high-frequency scenarios can also be satisfied.
For blockchain entertainment, it can support the securitization of star assets, such as star-related token assets. In terms of blockchain big data, it can support the data right, ensure that the data owner controls the data ownership, ensure the authenticity of the data, traceability, can not be modified, and finally realize data transactions according to the needs of different entities. , to ensure personal privacy and data security.
Based on HPB's blockchain infrastructure, based on its high performance, blockchain applications can be built in multiple scenarios. The HPB design provides a blockchain application program interface and application development package. In the HPB blockchain base layer, it provides blockchain data access and interactive interfaces, and supports various applications and development languages ​​using JSON-RPC and RESTful APIs. It also supports multi-dimensional blockchain data query and transaction submission, and the interactive access interface can be integrated with the privilege control system.
The application development package includes comprehensive functional service packages that operate on blockchains based on different development languages. For example, it provides functional interfaces such as encryption, data signature, and transaction generation, and can seamlessly support integration and function expansion of various language service systems. , supports multiple language SDKs such as Java, JavaScript, Ruby, Python, and .NET.
Conclusion
If the future blockchain wants to enter the mainstream population, it must have high-performance public-chain or infrastructure support to form a true application ecosystem. Ethereum's dream to build a decentralized ecosystem cannot be achieved on an existing basis. Ethereum is trying to improve performance and expand scalability through fragmentation, plasma, and pos consensus mechanisms.
At the same time, the current status quo has also spawned other public-linked efforts, including eos, HPB, etc. Among them, HPB has adopted a unique combination of hardware and software, dedicated BOE hardware acceleration, signature verification speed, encryption channel security, data transmission Speed, network performance, and high concurrent support all have their own advantages over simple software solutions.
In the software architecture, consensus algorithms for internal and external elections, flexible virtual machine design, application program interfaces, and development packages are also used to provide infrastructure for the development of blockchain application scenarios.
From the overall design of HPB, its goal is to provide high-performance infrastructure for the entire blockchain to mainstream people. With a high-performance infrastructure, blockchains can only be implemented in many high-frequency scenarios to create more application ecosystems and have the opportunity to reach mainstream people.
The HPB team focused on the technical background, including the founder Wang Xiaoming who was an early evangelist in the blockchain and once participated in the establishment of UnionPay Big Data, Beltal, and Beltal CTO. Co-founder CTO Xu Li has more than 10 years of experience in chip industry R&D and management. He was responsible for the logic design, R&D, and FPGA chip marketing of the core products of the world's top qualified equipment suppliers and the world's largest component distributor. Technical VP Shu Shanlin once worked for Inspur, a well-known Chinese server manufacturer, as an embedded chief engineer, and has extensive R&D experience in embedded software and underlying software. Another co-founder, Li Jinxin, is a former blockchain analyst of Guotai Junan and has extensive experience in digital asset investment.
The background of the team members is in line with the HPB's soft and hard path. According to the latest monthly report, the basic PCB layout design of the BOE board, the overall architecture design of the BOE, and the ECC acceleration scheme have also been completed. At the same time, several tests have been completed for the BOE hardware acceleration engine.
It is hoped that HPB will develop rapidly and will embark on a path with its own characteristics in the future of blockchain infrastructure competition. It will provide support for more decentralized applications and eventually build a prosperous ecosystem.
Risk Warning: All Blue Fox articles do not constitute investment recommendations, investment risks, it is recommended to conduct in-depth inspection of the project, and carefully make their own investment decisions.
Source: https://mp.weixin.qq.com/s/RSuz6R6MTotEL_U__Al_Wg
submitted by azerbajian to HPBtrader [link] [comments]

FinalIncorrectCltvExpiry Node to Node communication gRPC

I am trying to pay invoices from one of my nodes towards the other..
Via Shell I am able to but not via python code. It always throws
"payment_error: "FinalIncorrectCltvExpiry(expiry=1451302)""
for the sender and
"[ERR] HSWC: Onion payload of incoming htlc(1a9536800ec26cbcdfd4319c2de419a7c92a9e84598f6c0b7a3df8126a00bffe) has incorrect time-lock: expected 1451326, got 1451302"
for the receiver.
Paying towards Starblocks is no problem also paying via shell is also no problem even between the nodes.

My code (all invoices are stored in invoices.txt)
import rpc_pb2 as ln import rpc_pb2_grpc as lnrpc import grpc import os # Due to updated ECDSA generated tls.cert we need to let gprc know that # we need to use that cipher suite otherwise there will be a handhsake # error when we communicate with the lnd rpc server. os.environ["GRPC_SSL_CIPHER_SUITES"] = 'HIGH+ECDSA' # Lnd cert is at ~/.lnd/tls.cert on Linux and # ~/Library/Application Support/Lnd/tls.cert on Mac cert = open(os.path.expanduser('/home/bitcoin/.lnd/tls.cert'), 'rb').read() creds = grpc.ssl_channel_credentials(cert) channel = grpc.secure_channel('localhost:10009', creds) stub = lnrpc.LightningStub(channel) import codecs # Lnd admin macaroon is at ~/.lnd/data/chain/bitcoin/simnet/admin.macaroon on Linux and # ~/Library/Application Support/Lnd/data/chain/bitcoin/simnet/admin.macaroon on Mac with open(os.path.expanduser('/home/bitcoin/.lnd/data/chain/bitcoin/testnet/admin.macaroon'), 'rb') as f: macaroon_bytes = f.read() macaroon = codecs.encode(macaroon_bytes, 'hex') metadata = [('macaroon',macaroon)] # Extract details from the invoice # https://api.lightning.community/?python#decodepayreq raw_invoice = ln.PayReqString(pay_req="lntb1...5x7y") invoice_details = stub.DecodePayReq(raw_invoice, metadata=[('macaroon', macaroon)]) # https://api.lightning.community/?python#sendrequest request = ln.SendRequest( dest_string=invoice_details.destination, amt=invoice_details.num_satoshis, payment_hash_string=invoice_details.payment_hash ); response = stub.SendPaymentSync(request, metadata=[('macaroon', macaroon)]) print(response) 

submitted by snt1991 to lightningnetwork [link] [comments]

Pentesterlab. ECDSA challenge

Hi there,

I am struggling with Pentesterlab challenge: https://pentesterlab.com/exercises/ecdsa

I'm wondering who can give some lights on how to resolve some steps in this challenge. You can read about similar challenge there - https://ropnroll.co.uk/2017/05/breaking-ecdsa/
I suppose I have problems with extracting (r,s) from ESDCA (SECP256k1) signature (here details - https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm)

I even try to brute-force all possible (r,s) values but no luck. Every time I receive error 500.

def recover_key(c1, sig1, c2, sig2, r_len, s_len): n = SECP256k1.order cookies = {} for s_idx in range(s_len, s_len + 2): for r_idx in range(r_len, r_len + 2): s1 = string_to_number(sig1[0 - s_idx:]) s2 = string_to_number(sig2[0 - s_idx:]) # https://bitcoin.stackexchange.com/questions/58853/how-do-you-figure-out-the-r-and-s-out-of-a-signature-using-python r1 = string_to_number(sig1[0 - (s_idx + r_idx + 2):0 - (s_idx)]) r2 = string_to_number(sig2[0 - (s_idx + r_idx + 2):0 - (s_idx)]) z1 = string_to_number(sha2(c1)) z2 = string_to_number(sha2(c2)) # Find cryptographically secure random k = (((z1 - z2) % n) * inverse_mod((s1 - s2), n)) % n # k = len(login1) # Recover private key da1 = ((((s1 * k) % n) - z1) * inverse_mod(r1, n)) % n # da2 = ((((s2 * k) % n) - z2) * inverse_mod(r2, n)) % n # SECP256k1 is the Bitcoin elliptic curve sk = SigningKey.from_secret_exponent(da1, curve=SECP256k1, hashfunc=hashlib.sha256) # create the signature login_tgt = "admin" # Sign account login_hash = sha2(login_tgt) signature = sk.sign(login_hash, k=k) # Create signature key sig_dic_key = "r" + str(r_idx) + "s" + str(s_idx) try: # because who trusts python vk = sk.get_verifying_key() vk.verify(signature, login_hash) print(sig_dic_key, " - good signature") except BadSignatureError: print(sig_dic_key, " - BAD SIGNATURE") 

Its very interesting challenge and I want to break ECDSA finally.
Thanks in advance
submitted by unk1nd0n3 to webappsec [link] [comments]

ANN: Arionum (ARO)

We would like to proudly announce Arionum, a new cryptocurrency built from scratch!
Introduction
Arionum was designed with the future in mind, in a market where the growth beats all expectations. Arionum aims to offer a secure electronic payments system that is able to scale without a degraded performance or a degraded user experience. It offers a fixed 0.25% fee on all transactions and it has a dynamic transaction limit per block, allowing it to keep up with a growing number of transactions at all times.
One of the main advantages of Arionum is that it was fully written from scratch in PHP, one of the most popular programming languages in the world. While php is not as fast as c++. for example, the high number of developers that can easily understand and develop PHP and the Arionum compensates for this. The main inspiration has been Satoshi Nakamoto's bitcoin white paper, but all the code has been thought and written by the developers to keep it's originality.
Arionum has been thought as a democratic and egalitarian coin, having no pre-mined coins, long mining period, no developer fees and an algorithm that advantages the average user with available CPU resources rather than mining farms.
Original Announcement: https://bitcointalk.org/index.php?topic=2710248.0
Specifications
Name: Arionum
Symbol: ARO
Block time: ~ 4 minutes
Mining reward: Starts at 1000 and decreases by 10 each 10800 blocks
Mining time: 8 years and 4 months
Premine: NO Premine
Transaction fee: Always 0.25%
Block Hash: sha512
Mining algorithm: Argon2i + SHA512
Total coin supply: 545.399.000
Signature Algorithm: ECDSA's secp256k1 curve
DB Backend: MySQL / MariaDB
Whitepaper: https://www.arionum.com/wp.pdf
Roadmap
Download links
Official links
Official website: https://www.arionum.com
Block explorer: https://arionum.info
Forum: https://forum.arionum.com
FAQ: https://forum.arionum.com/viewtopic.php?f=13&t=11
Social networking
Twitter: https://twitter.com/ArionumCrypto
Discord: https://arionum.info/discord/
Pools
Official Pool: http://aropool.com
submitted by AroDev to Arionum [link] [comments]

16 Finally going to be part of the 21 Million Club

Warning skip to second paragraph for the more important part I first heard of Bitcoin in an issue of the Linux Format, I said to myself oh some stupid internet money better pass. This was in 2010. I was a teenager first learning about Computer Science by just playing around with computers, tinkering with some languages and some very small projects that never lead to anything. Fast forward to Freshman year in High School. Bitcoin hits $1100. Our business class is discussing it, I was skeptical of it, and the class eventually convinced itself as some stupid fad. We believed it was some Japanese company or something. We couldn't believe it was decentralized, we had to believe someone was behind it. Now fast forward to Sophomore year. I am sitting in my Comp Sci class completely bored, and after watching Alan Turing in that enigma movie, really good movie by the way, I decided I should make my own cipher. I played with a Python console and simulated the Enigma(I read it was secure(except it was weakened, not broken, by the fact that a letter couldn't encrypt to itself, and there were flaws with the German commanders who used it, it was 99% human error that took down the Enigma). I said this is pretty nice. I think I got a keyspace of ~73 bits, I'm sure there were flaws that probably weakened that keyspace and the algorithm, one error I faced was that when one rotor would flick and another does and the net change is 0 you have a repetition, but I wasn't able to kink that out and just added another rotor. I begin playing with cryptography, I passed the class with flying colors while still doing nonsense for around 80% of the class time, I've been programming since second grade(thanks to a great influence who got me in early). I played with RSA, Diffie-Hellman, and all these, then I learned of Bitcoin. Nearly every book I read had a reference to Bitcoin(I had the luxury of pirating textbooks and finding parts that I would like, a few I had to buy). Then I learned of Elliptic Curves. I couldn't figure it out for a long time. RSA took me maybe two weeks to implement. ECDSA is something I still barely understand. I bought a book on it, no help, it doesn't do enough to explain inverses in a finite field, and other topics I couldn't grasp. I'm still playing with it, I implemented a few functions on an elliptic curve, I couldn't do a few others, I can't derive the order of a field etc, but I can do point addition and a few other things. Let's just say I went really overboard and became a Bitcoin enthusiast in maybe 9 months. I lurk on this subreddit probably daily now.
Now I finally am becoming part of the 21 Million Club. I saved some $300 and will be going to CVS to buy a money order tomorrow to buy an entire Bitcoin. I generated some sort of Cold Storage on a Ubuntu machine(online but pretty damn sure I'm not compromised, I've held around .8 BTC earlier this year and nothing). I deleted the private keys etc, I made two paper wallets, one unencrypted, which will be kept in my house, and one encrypted one which I will hope to find some where safe to keep just in case there ever is a fire in my house or whatever. I took a picture, I also have a bunch of other paperwallets that all they are missing are hologram stickers, the ones worth less than $10 I just taped up, I keep these just in case someone is interested enough in Bitcoin for me to give them some, I've given out about 4. I mean I felt very excited to finally join the 21 Million Club and just had to post lol. To the moon. EDIT: It didn't post with my photo. 1 BTC in Cash unfortunately(for tonight) TLDR: Excited kid turns into a Bitcoin enthusiast, goes out of his way to buy and entire Bitcoin. Addition: I can and probably should work by now, but I decided that this summer I was just going to work on sports, and more computer science, so that's how it went.
submitted by justinba1010 to Bitcoin [link] [comments]

[Index] Scaling Conference Overview: Day 1

Conference Topic \ Speaker \ Time Link
Privacy \ Fungibility
Scalability
Smart Contracts
Proof of Work
submitted by KarmaNote to Bitcoin [link] [comments]

Electrum bitcoin wallet doesn't start

Attempting to start:
$ electrum Error: No module named 'requests'.
eopkg info electrum gives:
Installed package: Name : electrum, version: 3.0.6, release: 29 Summary : Lightweight Bitcoin client Description : Lightweight Bitcoin client Licenses : MIT Component : network.clients Dependencies : dnspython python3-qt5 python-ecdsa python-jsonrpclib python-pbkdf2 python-protobuf python-pyaes python-pysocks python-qrcode python-six python-slowaes python-xmlrpclib Distribution : Solus, Dist. Release: 1 Architecture : x86_64, Installed Size: 4.17 MB Reverse Dependencies:
Package found in Solus repository: Name : electrum, version: 3.0.6, release: 29 Summary : Lightweight Bitcoin client Description : Lightweight Bitcoin client Licenses : MIT Component : network.clients Dependencies : dnspython python3-qt5 python-ecdsa python-jsonrpclib python-pbkdf2 python-protobuf python-pyaes python-pysocks python-qrcode python-six python-slowaes python-xmlrpclib Distribution : Solus, Dist. Release: 1 Architecture : x86_64, Installed Size: 4.17 MB, Package Size: 1.10 MB Reverse Dependencies:
electrum package is not found in source repositories
I installed from software center.
submitted by sati_mutwa to SolusProject [link] [comments]

4A Coin Whitepaper

4A Coin: A web-based cryptocurrency network. Summary~ Because the first generation cryptocurrencies such as Bitcoin, Ethereum and Litecoin distribute the money issuing task according to the power of machines such as GPU and CPU, they accumulate the payments in the mempool and they mine by changing the nonce number randomly or by continuously increasing it and trying repeatedly until they find a hash summary that matches the difficulty they specify, instead of processing the payments made in real-time instantly. This solution is ingenious if you want to use digital currency as a value storage tool. But when you try to use these digital currencies to pay for coffee or purchase a product online, it stands out as a disadvantage since you have to pay commissions to those miners and have to wait too long. As you know, the power of large payment solutions, such as Paypal or Western Union, comes from their servers and software. We also started working on a noncentralized, blockchain-protected end-toend (P2P) cryptocurrency that works as a web service. In such a case, for the system to survive and ensure security, instead of paying for the server cost, we set up a system where servers, that are nodes in the system, can get paid, provided they just stay online for 44 hours instead of mining. People get paid for a useful service they provide instead of wasting their time. There will be a reason for people to install this system on their servers because they are rewarded as long as they remain as servers. When people send an end-to-end payment, the servers, by finding a summary of this payment (They find this summary in order for all systems to meet at a common point and validate payments, and because it is a necessity of the blockchain architecture), ending with 4A, including the time, the sender, the receiver, amount, summary of the previous transaction and the data contained in a digital signature indicating that the sender is actually sending it, without any difficulty and they add it to their databases. Because there are no such concepts as block size or mining involved in any way, the registration process is completed instantly. We use a task queue management library called Celery Project, which is used by companies such as Instagram and Mozilla to prevent complication that may occur if 100 transactions take place within the same second. Security~ If you noticed when you entered the site, I told you that it was safer than Visa. This may seem an ambitious sentence for many, but if you actually know what you're doing when you buy a product online, you are aware of the risks involved. Risk & Problem~ When you type information in the payment form, such as credit card, CVV, and so on, malicious people on the web can read the data you send through these forms. Just because of this, payment solutions require you to add an SSL certificates to your site. These SSL certificates actually save your data using cryptography and protect it until it reaches the recipient. Well, what if the seller has bad intentions? Solution~ 4A Coin encrypts your payments using the Elliptic Curve Digital Signature Algorithm (ECDSA) and sends a signature confirming that you want to pay instead of giving your digital password to the network. This is actually the idea of Satoshi Nakamoto and it is known as P2PKH in Bitcoin. So if we actually compare 4A Coin to a credit card, then no one will ever see your credit card details. In addition, SSL certificate is no longer needed because a malicious user who can tap into your network seeing your payment signature won't change anything, besides it is already publicly shared everywhere. Thus, we have already gotten rid of certificate issues like security and SSL in the first place. Commission Solution~ When you benefit from a local payment solution, you will have to pay a commission to the companies you work with, between 5% and 20% of your sales. The coins you use in 4A Coin are already generated by the nodes, so they do not ask for a commission. Thanks to this, you do not pay commissions for transactions nor for any other reason. Wallets ~ wallet_id ~ 4A01eaedb37fc09fdb94c6d632adf9f63d private_key ~ cbc949239a333559f5dd8b0b5cf3d32923c2cab3 7c2bde9c8042a3dafe59a6b9 Your wallet is actually an ECDSA key pair. At first, we used RSA for this, but we had to switch to ECDAS because the keys were too long in the RSA and were taking too much space. Users have public keys, private keys, and wallet addresses created by processing public keys. Public key is not visible to users on the system. Instead, they will see a short version of a summary generated by public key processing as their wallet. def generate_wallet_from_pkey(public_key): binmnmn = public_key.encode('utf-8') first_step = 34 - len(settings.CURRENCY) wallet_id = hashlib.sha256(binmnmn).hexdigest() wallet_id = wallet_id[-first_step:] wallet_id = "".join((settings.CURRENCY, wallet_id)) return wallet_id This function simply creates a wallet from the simply given public key's SHA-256 summary. Public keys are required for the approval of digital signatures, so it is necessary to keep the public key in transactions. Payments~ When a user makes a payment, the payment time (in epoch format & GMT), the sender's address, the recipient's address, the summary of the previous transaction and the amount sent are transferred to a dictionary. This dictionary can be sorted differently on different computers, and to prevent this, the contents of this dictionary must be organized in a way that is ordered from A to Z, and will give the same result in everyone. data = collections.OrderedDict(sorted(data.items())) With the above code, we can create a stable dictionary that can work globally. Finally, we take a summary of this dictionary and record it in our database, and broadcast it to other servers that we have recorded it. Peer to Peer~ We use the TCP port and web socket technology to ensure that the system is P2P. For the script to work, you need to use Python3. Because, we use the Twister Matrix Library and the Autobahn Python libraries to provide real time transactions. The port we use globally is the 9000th port. There are 3 different types of broadcasting in real time processes: The first one is “Hi, I'm a new node, please add me to your network” and the other one is “Hi, I'm a new process, please verify me”. This is parsed on the server side and necessary actions are taken. The third broadcasting type will be explained in the proof of cloud section. Mining ~ A total of 450 million of 4A Coins will be issued with 300.000.000 Pre-mined. 150 million coins will be mined by a method called Proof of Cloud. Proof of Cloud~ Proof of Cloud or POC refers to a method of earning based on time as a server instead of mining. Each node, by staying online for 44 hours, will send a message as "I have been online for 44 hours, so check my database to see if I have been online by reviewing my recent transactions." If it proves that you have approved transactions for the last 44 hours, you will be eligible to receive the reward. Celery & Redis~ We use Celery, a library that automatically controls tasks so that certain processes can be repeated at certain times in the system. Celery needs Redis to work. Redis is an open source NoSQL (NoSQL is the name given to database systems that store “non-relational” data schematically. NoSQL is literally being used in the sense of "not-only- SQL", which means "only SQL is not used".) software written on Linux as the pure version. Keeping the system up and running~ We use Gunicorn 'Green Unicorn' and Nginx, the Python WSI HTTP Server, to ensure that the system can handle high load and maintain its endurance; Nginx is a Web server designed to focus on high concurrency, high performance and low memory usage. It can also be used as a reverse proxy server, load balancer, and HTTP cache. We were actually using Supervisord to keep all these systems up and running, but since Supervisord did not work with Python3 we started using Circusd developed by the Mozilla Foundation and we were more satisfied with it than Supervisiord. It is much easier to install and use, requires Tornado framework to work on its own, and works correctly with the 4.5.3 version of Tornado. This version is already installed automatically in requirements.txt, but it is important that you know this detail.
submitted by 4acoin to u/4acoin [link] [comments]

4A Coin Whitepaper

4A Coin: A web-based cryptocurrency network. Summary~ Because the first generation cryptocurrencies such as Bitcoin, Ethereum and Litecoin distribute the money issuing task according to the power of machines such as GPU and CPU, they accumulate the payments in the mempool and they mine by changing the nonce number randomly or by continuously increasing it and trying repeatedly until they find a hash summary that matches the difficulty they specify, instead of processing the payments made in real-time instantly. This solution is ingenious if you want to use digital currency as a value storage tool. But when you try to use these digital currencies to pay for coffee or purchase a product online, it stands out as a disadvantage since you have to pay commissions to those miners and have to wait too long. As you know, the power of large payment solutions, such as Paypal or Western Union, comes from their servers and software. We also started working on a noncentralized, blockchain-protected end-toend (P2P) cryptocurrency that works as a web service. In such a case, for the system to survive and ensure security, instead of paying for the server cost, we set up a system where servers, that are nodes in the system, can get paid, provided they just stay online for 44 hours instead of mining. People get paid for a useful service they provide instead of wasting their time. There will be a reason for people to install this system on their servers because they are rewarded as long as they remain as servers. When people send an end-to-end payment, the servers, by finding a summary of this payment (They find this summary in order for all systems to meet at a common point and validate payments, and because it is a necessity of the blockchain architecture), ending with 4A, including the time, the sender, the receiver, amount, summary of the previous transaction and the data contained in a digital signature indicating that the sender is actually sending it, without any difficulty and they add it to their databases. Because there are no such concepts as block size or mining involved in any way, the registration process is completed instantly. We use a task queue management library called Celery Project, which is used by companies such as Instagram and Mozilla to prevent complication that may occur if 100 transactions take place within the same second. Security~ If you noticed when you entered the site, I told you that it was safer than Visa. This may seem an ambitious sentence for many, but if you actually know what you're doing when you buy a product online, you are aware of the risks involved. Risk & Problem~ When you type information in the payment form, such as credit card, CVV, and so on, malicious people on the web can read the data you send through these forms. Just because of this, payment solutions require you to add an SSL certificates to your site. These SSL certificates actually save your data using cryptography and protect it until it reaches the recipient. Well, what if the seller has bad intentions? Solution~ 4A Coin encrypts your payments using the Elliptic Curve Digital Signature Algorithm (ECDSA) and sends a signature confirming that you want to pay instead of giving your digital password to the network. This is actually the idea of Satoshi Nakamoto and it is known as P2PKH in Bitcoin. So if we actually compare 4A Coin to a credit card, then no one will ever see your credit card details. In addition, SSL certificate is no longer needed because a malicious user who can tap into your network seeing your payment signature won't change anything, besides it is already publicly shared everywhere. Thus, we have already gotten rid of certificate issues like security and SSL in the first place. Commission Solution~ When you benefit from a local payment solution, you will have to pay a commission to the companies you work with, between 5% and 20% of your sales. The coins you use in 4A Coin are already generated by the nodes, so they do not ask for a commission. Thanks to this, you do not pay commissions for transactions nor for any other reason. Wallets ~ wallet_id ~ 4A01eaedb37fc09fdb94c6d632adf9f63d private_key ~ cbc949239a333559f5dd8b0b5cf3d32923c2cab3 7c2bde9c8042a3dafe59a6b9 Your wallet is actually an ECDSA key pair. At first, we used RSA for this, but we had to switch to ECDAS because the keys were too long in the RSA and were taking too much space. Users have public keys, private keys, and wallet addresses created by processing public keys. Public key is not visible to users on the system. Instead, they will see a short version of a summary generated by public key processing as their wallet. def generate_wallet_from_pkey(public_key): binmnmn = public_key.encode('utf-8') first_step = 34 - len(settings.CURRENCY) wallet_id = hashlib.sha256(binmnmn).hexdigest() wallet_id = wallet_id[-first_step:] wallet_id = "".join((settings.CURRENCY, wallet_id)) return wallet_id This function simply creates a wallet from the simply given public key's SHA-256 summary. Public keys are required for the approval of digital signatures, so it is necessary to keep the public key in transactions. Payments~ When a user makes a payment, the payment time (in epoch format & GMT), the sender's address, the recipient's address, the summary of the previous transaction and the amount sent are transferred to a dictionary. This dictionary can be sorted differently on different computers, and to prevent this, the contents of this dictionary must be organized in a way that is ordered from A to Z, and will give the same result in everyone. data = collections.OrderedDict(sorted(data.items())) With the above code, we can create a stable dictionary that can work globally. Finally, we take a summary of this dictionary and record it in our database, and broadcast it to other servers that we have recorded it. Peer to Peer~ We use the TCP port and web socket technology to ensure that the system is P2P. For the script to work, you need to use Python3. Because, we use the Twister Matrix Library and the Autobahn Python libraries to provide real time transactions. The port we use globally is the 9000th port. There are 3 different types of broadcasting in real time processes: The first one is “Hi, I'm a new node, please add me to your network” and the other one is “Hi, I'm a new process, please verify me”. This is parsed on the server side and necessary actions are taken. The third broadcasting type will be explained in the proof of cloud section. Mining ~ A total of 450 million of 4A Coins will be issued with 300.000.000 Pre-mined. 150 million coins will be mined by a method called Proof of Cloud. Proof of Cloud~ Proof of Cloud or POC refers to a method of earning based on time as a server instead of mining. Each node, by staying online for 44 hours, will send a message as "I have been online for 44 hours, so check my database to see if I have been online by reviewing my recent transactions." If it proves that you have approved transactions for the last 44 hours, you will be eligible to receive the reward. Celery & Redis~ We use Celery, a library that automatically controls tasks so that certain processes can be repeated at certain times in the system. Celery needs Redis to work. Redis is an open source NoSQL (NoSQL is the name given to database systems that store “non-relational” data schematically. NoSQL is literally being used in the sense of "not-only- SQL", which means "only SQL is not used".) software written on Linux as the pure version. Keeping the system up and running~ We use Gunicorn 'Green Unicorn' and Nginx, the Python WSI HTTP Server, to ensure that the system can handle high load and maintain its endurance; Nginx is a Web server designed to focus on high concurrency, high performance and low memory usage. It can also be used as a reverse proxy server, load balancer, and HTTP cache. We were actually using Supervisord to keep all these systems up and running, but since Supervisord did not work with Python3 we started using Circusd developed by the Mozilla Foundation and we were more satisfied with it than Supervisiord. It is much easier to install and use, requires Tornado framework to work on its own, and works correctly with the 4.5.3 version of Tornado. This version is already installed automatically in requirements.txt, but it is important that you know this detail.
submitted by 4acoin to u/4acoin [link] [comments]

Cold Wallet Generator updated with BIP 0038 encryption

I've updated my Cold Wallet Generator utility to create BIP 0038-encrypted cold-storage addresses. Using BIP-0038 encryption means that you can feel better about the safety of printed copies of your private keys. If someone finds your keys, they'll need to know the passphrase before spending the funds. Of course, if you lose the passphrase and don't have unencrypted copies of the private keys saved somewhere else, you'll be locked out, too. If you're following the BIP 0038 cracking challenge, you'll know that brute-forcing even a short scrypt-based key is very difficult.
Why would you use this over bitaddress.org, which also offers BIP 0038? They both do the same thing, and the paper wallets from bitaddress are gorgeous. But this one doesn't require a web browser, you get to supply your own source of entropy, and because it relies on as many external libraries as possible (base58, scrypt, ecdsa, Crypto), it's significantly easier to inspect the source code for bugs or backdoors. This assumes, of course, that you trust your Python installation and the maintainers of the libraries.
Give it a try. Feedback appreciated. https://github.com/sowbug/cold-wallet-generator
submitted by sowbug to BitcoinWallet [link] [comments]

Pybitcointools: New User: Error when running test.py

Hello,
I'm new to python and the pybitcointools library so please bear with me.
I'm getting the following error when running test.py.
ERROR: test_all (__main__.TestTransaction) Traceback (most recent call last): File "c:\Python\pybitcointools\bitcoin\main.py", line 533, in ecdsa_raw_verify if not (27 <= v <= 34): TypeError: '<=' not supported between instaces of 'int' and 'NoneType' 
I'm running Python 3.6.3 [v3.6.3:2c5fed8, MSC v.1900 64 bit (AMD64)] on Windows-7
I'm using pybitcointools library, commit aeb0a2bbb8bbfe421432d776c649650eaeb882a5, from July 27,2017.
Has anyone come across the same problem? If so, what can I do to resolve this error?
Let me know. Thanks.
submitted by Dont-panic- to Bitcoin [link] [comments]

How do i combine four .deb files into one?

So i am trying to design a project that involves Bitcoin. The project requires a program called Electrum, and to install Electrum offline(a must have for security purposes) you have to install 4 separate .deb files into one. The files are:
python-slowaes_0.1a1-1_all.deb python-ecdsa_0.8-1_all.deb python-electrum_1.8-1_all.deb electrum_1.8-1_all.deb
My goal is for this USB to be user friendly, and having to click on 4 seperate .deb files and then manually selecting the install feature, and then waiting for each .deb to install. I am wondering how I combing all 4 .deb into one "super.deb" that you click on and it installs all four of them.
Cheers and Thanks,
thebigtaco
submitted by TheBigTaco to linux [link] [comments]

PyCoin

My local bitcoin hacker friend wrote some python library/utilities and wanted me to throw it out there for any other devs to look at.
pycoin -- Python Bitcoin Utilities
This is an implementation of a bunch of utility routines that may be useful when dealing with Bitcoin stuff. It has been test with Python 3.3 (but not Python 2.7).
submitted by Julian702 to Bitcoin [link] [comments]

Dev++ 01-01-EN  Foundational Math, ECDSA and Transactions - Jimy Song Breaking ECDSA (Elliptic Curve Cryptography) - rhme2 ... Elliptic Curve Digital Signature Algorithm (ECDSA) in NS2 Bitcoin 101 - Elliptic Curve Cryptography - Part 4 ... Constructing a Bitcoin transaction using python - 2/5

Pure-Python ECDSA. This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve Digital Signature Algorithm), implemented purely in Python, released under the MIT license. With this library, you can quickly create keypairs (signing key and verifying key), sign messages, and verify the signatures. The keys and signatures are very short, making them easy to handle and incorporate ... I need to sign a hash of 256 bits with ECDSA using a private key of 256 bits, just as bitcoin does, and I am reaching desperation because of the lack of documentation of ecdsa in python. I found a... Sign / Verify Messages using ECDSA - Examples in Python. After we explained in details how the ECDSA signature algorithm works, now let's demonstrate it in practice with code examples.. In this example, we shall use the pycoin Python package, which implements the ECDSA signature algorithm with the curve secp256k1 (used in the Bitcoin cryptography), as well as many other functionalities related ... Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up. Sign up to join this community. Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Bitcoin . Home ; Questions ; Tags ; Users ; Unanswered ; Jobs; how do you figure out the r and s out of a signature using python [closed ... The following are 30 code examples for showing how to use ecdsa.SECP256k1().These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

[index] [6756] [5730] [40972] [34792] [7716] [18894] [9653] [17991] [19748] [1235]

Dev++ 01-01-EN Foundational Math, ECDSA and Transactions - Jimy Song

We are going to recover a ECDSA private key from bad signatures. Same issue the Playstation 3 had that allowed it to be hacked. -=[ 🔴 Stuff I use ]=- → Micro... This video is for people who want to use (almost) raw python code to Constructing a Bitcoin transaction. In the previous videos, I've explained how to connect to the bitcoin network, as well as ... This video is for people who wants to use (almost) raw python code to create a private and a public Bitcoin keys and to convert them to Bitcoin address. In this video I'm using the external ... Bitcoin ECDSA- Elliptic curve Digital Signature - Duration: 8:43. Dr Abdel lam 3,113 views. 8:43. Kubernetes for Beginners - Docker Introduction in 15 Minutes - Duration: 14:03. ... Welcome to WBN's Bitcoin 101 Blackboard Series -- a full beginner to expert course in bitcoin. Please like, subscribe, comment or even drop a little jangly in our bitcoin tip jar ...

#