Position: Home page » Ethereum » Ethereum public and private key generation rules

Ethereum public and private key generation rules

Publish: 2021-05-24 12:38:59
1. DES is symmetric encryption. There is only one key
2.

To use OpenSSL on Ubuntu, you need to install it first. The command is as follows:

sudo apt get install OpenSSL

after the installation, you can use OpenSSL

first, you need to enter the interactive interface of OpenSSL and enter OpenSSL on the command line

1) generate RSA private key:

genrsa - out RSA_ private_ Key.pem 1024

this command will generate a 1024 bit private key. The successful interface is as follows:


3) generate RSA public key

input the command RSA - in RSA_ private_ key.pem -pubout -out rsa_ public_ Key.pem and enter

3. If you want to use OpenSSL on Ubuntu, you need to install it first. The command is as follows: sudo apt get install OpenSSL. After installation, you can use OpenSSL. First of all, you need to enter the interactive interface of OpenSSL and enter OpenSSL on the command line; 1) Generating RSA private key: genrsa - out RSA_ private_ Key.pem 1024 this command will generate a 1024 bit private key. The successful interface is as follows: at this time, we can see RSA in the current path_ private_ The key.pem file is missing. 2) Convert RSA private key to pkcs8 format and input pkcs8 - topk8 - Information PEM - in RSA_ private_ Key.pem - outform PEM – nocrypt, and enter to get the result of generating success, which is the private key in pkcs8 format, as shown in the following figure: 3) generate RSA public key input command RSA - in RSA_ private_ key.pem -pubout -out rsa_ public_ Key.pem, and enter to get the result of successful generation, as shown in the following figure: at this time, we can see a file named RSA_ public_ Key.pem file, open it, you can see the string without newline at the beginning of --- - begin public key --- - end public key ---. This is the public key.
4. This should be IC card intelligent parking lot charging management system, which is the general name of modern parking lot vehicle charging and equipment automatic management. The system organically combines machinery, electronic computer, automatic control equipment and intelligent IC card technology. Through computer management, it can realize vehicle image comparison, automatic charging, automatic data storage and other functions, And the parking lot management system can realize offline operation, in the case of computer failure can still ensure the normal access of vehicles, is an ideal facility for modern residential property management
the intelligent parking fee collection system is a set of network system which is built by computer, network equipment and lane management equipment to manage the vehicle access, traffic flow guidance and parking fee collection in the parking lot. It is a necessary tool for professional depot management company. It realizes the dynamic and static comprehensive management of vehicles in and out of the yard by collecting and recording the records of vehicles in and out of the yard and the location of the yard. The system generally takes the radio frequency inction card as the carrier, records the vehicle in and out information through the inction card, realizes the charging strategy through the management software, realizes the charging accounting management, Lane equipment control and other functions.
5. OpenSSL gensa - DES3 - out server. Key 1024
when running, you will be prompted to enter a password. This password is used to encrypt the key file (parameter DES3 refers to the encryption algorithm, of course, you can choose other algorithms that you think are safe). In the future, you need to enter a password whenever you need to read this file (through the command or API provided by OpenSSL). If you find it inconvenient, you can also remove this password, But we must take other protective measures
command to remove the password of key file:
OpenSSL RSA - in server.key - out server.key!
6. /// < summary>
/ / / generate the private key and public key in XML format in the given path< br /> /// </ summary>< br /> public void GenerateKeys(string path)
7.

First of all, cracking RSA means ciphertext - & gt; The process of plaintext

Suppose plaintext m, ciphertext C, private key D, public key e, RSA encryption process is as follows:

1, two large mutually unequal prime numbers P and Q

2, n = P * q

3, FN = (P - 1) * (Q - 1)

4, e and FN are mutually prime, and 1 & lt; e < FN

5, D satisfies de% FN = 1

6, encryption and decryption:

C = (m ^ E)% n

m = (C ^ D)% n

the above formula can be understood as encryption by public key and decryption by private key

the first case : the plaintext and public key are known to get the ciphertext encrypted by the private key. This is the encryption process, which has little to do with the private key D. the encryption process mainly depends on the value of n

suppose that there are countless kinds of plaintext m, public key e, private key D and ciphertext C

in the second case, : the private key is obtained by knowing the plaintext ciphertext and public key

given plaintext m, ciphertext C and public key e, find private key D, and insert the secondary formula: C = (m ^ E)% N, the value of n is not unique, so the value of private key D is not unique


when there are correct answers for comparison, I feel that the second situation is easier to find out

personal opinions, welcome to discuss

8. This is very simple. If the password is entered manually, it is completely OK in theory, but sometimes the key is binary, sometimes hundreds of bits will be converted to other bases. It is very easy to make mistakes, and the private key is manually entered from one to another. How can you ensure that the public key and private key you enter can be configured into a pair of keypairs, and the public key and private key must be changed from p q If manual input is too troublesome

why don't we encapsulate these tedious and error prone things to simplify our development
so we have all kinds of development packages, all kinds of architectures, all kinds of libraries

in Java
keypairgenerator keygen = keypairgenerator. GetInstance (& quot; RSA");< br />KeyPair key = keyGen.generateKeyPair(); < br /> cipher.init(Cipher.ENCRYPT_ MODE, key.getPublic());< br /> cipher.init(Cipher.DECRYPT_ MODE, key.getPrivate());
this is a fragment of the code I wrote before. It is not continuous. In general, I get a RSA key pair and then call getpublic ()
getprivatekey () to get the public and private key.
9. AE
Post special effects editing software
is used to do video special effects
there are free versions on the Internet
now there are more
various cracking
if you download
go in
aetalk
or
there are more in CG
it's better
hope to adopt
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750