(no commit message)
[libreriscv.git] / nlnet_2021_crypto_router.mdwn
1 # NL.net proposal
2
3
4 ## Project name
5
6 The Libre-SOC Gigabit Router
7
8 ## Website / wiki
9
10 <https://libre-riscv.org/nlnet_2021_crypto_router>
11
12 Please be short and to the point in your answers; focus primarily on
13 the what and how, not so much on the why. Add longer descriptions as
14 attachments (see below). If English isn't your first language, don't
15 worry - our reviewers don't care about spelling errors, only about
16 great ideas. We apologise for the inconvenience of having to submit in
17 English. On the up side, you can be as technical as you need to be (but
18 you don't have to). Do stay concrete. Use plain text in your reply only,
19 if you need any HTML to make your point please include this as attachment.
20
21 ## Abstract: Can you explain the whole project and its expected outcome(s).
22
23 Blockchain and cryotographic primitives are extremely complex mathematics
24 where performance and power consumption contend with understandability, correctness and auditability. Implementations of cryptographic alorithms in OpenSSL for example are hard-coded hand-optimised assembler, which makes review and trust extremely challenging, particularly when "best practices" (SSL Certificates) result in some algorithms being retired as obsolete with increasing frequency.
25
26 Even just the implementations of cryptographic and blockchain algorithms have to be so heavily optimised for a particular instruction set, in order to get high performance, that it is almost impossible to read the original whitepaper and see how it is relevant or correct (the lack of funding for review of OpenSSL rocked the internet back in 2012, with HeartBleed).
27
28 Simple-V Vectorisation has some extremely unusual data manipulation properties that negate the need for such heavy optimisation. We would like to explore this in-depth, for example examining Galois Field arithmetic, the basis of Elliptic Curve, AES, Error-correction algorithms and more, at the fundamental mathematical level and providing Vector Matrix Multiply and other abstractions, the combination of which lead to auditors to be able to see extremely clearly and quickly what the relationship is between the math and the actual implementation in hardware. The focus will be on investigation and implementation of cryptographic primitives for use in Blockchain, OpenSSL, on keeping the implementation simple and leveraging Formal Correctness Proofs to verify them.
29
30 The target worked example will be not to simply put this into an FPGA but to put together a 130nm ASIC under the Google Skywater Open PDK ASIC Programme, as a proof-of-concept Gigabit Router chip capable of securely handling network traffic and, having the underlying cryptographic primitives in place, being the basis of peer networking and blockchain applications which can be trusted with thode tasks by its full HDL and source code being publicly available for independent review.
31
32 Ultimately we want a demonstration ASIC of a tamper-proof auditable hardware implementation which can be trusted by end-users.
33
34
35 # Have you been involved with projects or organisations relevant to this project before? And if so, can you tell us a bit about your contributions?
36
37
38 # Requested Amount
39
40 EUR $50,000.
41
42 # Explain what the requested budget will be used for?
43
44 * Detailed review and documentation of the analysis of cryptographic hashing and encryption algorithms used in cryptonote and other blockchain technologies to ascertain the fundamental principles and mathematical primitives
45 - So far the list includes Rijndael (AES), SHA2, Graestl, Blake256, Chacga8, Keccac and more
46 - From Asymmetric Cryptography comes RSA, DSA, Diffie-Helmann
47 and Elliptic Curve
48 - From these it is clear that the primitives involve Matrix Multiply
49 operations and Galois Field arithmetic, as well as ternary bitmanipulation
50 and Carry-capable Vector "long arithmetic".
51 * Hardware implementation of the underlying instruction primitives and Vector-Matrix concepts needed to support the crypto-primitives used in blockchain algorithms
52 * Proof of Concept software implementation of the hashing algorithms identified, showing how Vectorised Matrix manipulation atvthe ISA level can greatly simplify the readability and clarity of cryptography, for aydit purposes.
53 * Formal Correctness proofs of the underlying hardware instruction primitives
54 * Implementation of RGMII and USB-ULPI in nmigen
55 * Implementation in nmigen of a DMA Engine suitable for Ethernet Frame packet transfer
56 * Porting of FlexLib ASIC Cell Library to google Skywater 130nm PDK
57 * Creation of an FPGA proof of concept Gigabit Router using a LibreSOC SimpleV core
58 * Layout of Gigabit Router ASIC using coriolis2 using google Skywater 130nm PDK
59
60 # Does the project have other funding sources, both past and present?
61
62
63 # Compare your own project with existing or historical efforts.
64
65
66 ## What are significant technical challenges you expect to solve during the project, if any?
67
68
69 ## Describe the ecosystem of the project, and how you will engage with relevant actors and promote the outcomes?
70
71
72
73 # Extra info to be submitted
74
75 * https://github.com/cryptonotefoundation/cryptonote/blob/master/src/crypto/