produce a public key from a private key with ecc, with a clear description about k = k * g

It was my fault.

G it is a point on the elliptic curve. It means G have a number for X and another for Y. so unzipped G in Secp256k1 it is G(x,y):

- Uncompressed form (prefix 04)
04 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798
483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8 

X = 79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798

Y = 483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8 

Y 04 to show this is an uncompressed way of G.

This point is Base point or Generator point which used in k=K*G.

* it's not like * in math like 2*2 = 4. It is a sign to display one of the curved operators.

We have 3 operators on a curve:


It is also to add two points. According to we have a point like P1(x1,x2)and another point like Q1(x2,y2)so we can't use 2+2 = 4, we need some other calculation to P+Q.
The result of P+Q is another point on the curve that we can call it R.

Doubling it is twice a point on the curve, and the result of this is also a point on the curve.
so P+P=R.

When we say k*G, we want multiple our private key to a point on the curve.

We need to do this:
Convert our private key to binary base.

With a for in all the bits we begin to verify:
For each of these bits we do some doublePoint Y addPoints.
This is a predefined role and we have to follow it.

But how can we calculate a addition two point?

λ = ( yq – yp ) / ( xq – xp)
xR = λ2 – xp – xq
yR = λ(xp – xR) – yP

With this. first we need to calculate λis ours slope.

Then we can calculate our x and y for a new point. and the result is our

p+q = R

and what about doubling?:

λ = (3x2) +a / (2y) 
xR = λ2 - 2x 
yR = λ(x - xR) – y

with these, we can now calculate K=k * G.

There are many other tips to calculate Public key since Private key.

This is a good implementation in PHP:

encryption: how to share information between devices, decrypt it later with a private key

I am developing an application for alert people if they meet a positive person covid-19.
I am very concerned about user privacy. So I need to make a user completely anonymous.

What you want is the following.

Suppose there are devices A, B, C,

A, B and C must broadcast their own UUID via Bluetooth
When A, B, and C are close to each other, A will have B, C UUID, and B will get A, C UUID, and vice versa.

Suppose A discovers that A is positive for Covid-19.
A will upload its UUID to a central server B and C also verifies the UUIDs with the server.
When B, C retrieves the UUID list of the infected person B's applications, C will check to see if they match any of the UUIDs downloaded from the server with the locally saved UUID.

But in my case I don't want the server to find the UUID of A. But somehow I need to send the UUID of A to other devices too. What will be the best approach?

My solution.

All devices will generate their own public and private key pairs.
Each application will encrypt its UUID with the public key it has generated and transmit to the other devices encrypted with the public key UUID +.

Once a particular user finds it positive for covid-19, it will upload their private key to the server.
All applications will download all private keys from all Covid positive devices. and check if the applications themselves can decrypt your messages with the private keys they have.

Is this possible? or what will be the best approach.

It is stupid to reveal the private key. And it will also be chaos to find the appropriate public key matching the private key as well … But nevertheless this was the only thing I could think of.

Chrome shortcut key for specific marker with placeholder

I'm looking for the fastest way to open a specific bookmark that has a placeholder.

for example:
I have a bookmark: www.subdomain.something- {placeholder} .com
I want to use a hot key, type & # 39; 123 & # 39 ;, hit enter and land at

Thanks for your help!

udev – Reassign the BTN_STYLUS event to the standard keyboard key?

I am trying to use a VEIKK graphics tablet on Kubuntu 19. So far I have a satisfactory setup, but the only thing left is to remap the pen buttons. I feel like I have all the ingredients to make it, but I can't figure out how to put it all together.

evtest Identify the entry in question:

/dev/input/event3:  VEIKK S640 Pen

Running evtest in this post reports:

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x2feb product 0x1 version 0x100
Input device name: "VEIKK S640 Pen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
    Event code 331 (BTN_STYLUS)
    Event code 332 (BTN_STYLUS2)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value  15580
      Min        0
      Max    98304
      Resolution       1
    Event code 1 (ABS_Y)
      Value  13040
      Min        0
      Max    32768
      Resolution       1
    Event code 24 (ABS_PRESSURE)
      Value   1670
      Min        0
      Max     8192

And actually, when I press the pencil button, I see

Event: time 1586123903.365325, type 1 (EV_KEY), code 331 (BTN_STYLUS), value 1

followed later by

Event: time 1586123903.499328, type 1 (EV_KEY), code 331 (BTN_STYLUS), value 0

What I would like to do is simply replace these events generated with different events let's say

type 1 (EV_KEY), code 30 (KEY_A), value 1

for the first and similarly for the second, so pressing the pencil button is the same as pressing the a Down (and up) key on the keyboard.

There are several closely related questions on this site, this being probably the closest one, but the proposed solutions and the final solution are quite confusing. I've also prototyped by writing a python-evdev script to "filter" these events into something, but that comes with its own problems.

So is there a standard way to achieve this using udev? doesn't want to import my bcc private key

I imported my BCC private key into But it doesn't ask for the private key and lists the address as "just look". I would like to import the amount of BCC into a wallet. All the tutorials in this regard do not correspond to the current blockchain menus.

Fraud – How can I get a private key for this address?

Note that you should never pay for a Blockchain Wallet private key. To receive a bitcoin, you just need to provide the sender with a bitcoin address from your wallet.

I am sorry to hear the experience you have had. Unfortunately, scammers in recent times have taken advantage of new users in the cryptocurrency space and their possible lack of knowledge about private keys, as well as some of the features of our wallet. Our wallet can NOT be used for mining, and must NEVER be purchased, created, or accessed by a third party. Any person or party who claims otherwise should be considered malicious and avoided. If another party has had access to the wallet, then it should be considered insecure and never be used to store funds. This is because the funds added or stored within that wallet could still be compromised with your Backup Phrase, despite password changes or enabled two-factor authentications.

Please note, within our wallet, a public bitcoin address can be imported into the wallet as & # 39; Watch Only or Non-Spend Funds & # 39 ;. This can be done with absolutely any address in the entire bitcoin network. Often, those who have paper wallets or addresses stored in other wallets use this feature as a way to view and track funds regardless of the private key of the bitcoin address in our wallet. The balance of imported addresses as & # 39; Clock-only or non-expendable funds & # 39; It will NOT appear as part of the main balance of the wallet, since without the private key for this address these funds are not expendable.

  • A private key is a data string that shows you have access to bitcoins at a specific address. Think of a private key as a specific password for each address. Private keys are generated and stored within the wallet that was used to create the bitcoin address. Private keys should never be shared, as they allow the owner to spend the bitcoins of the associated bitcoin address through their cryptographic signature.

Without a private key, you do not have ownership of an address or access to any fund it may contain. Scammers have been using this feature maliciously to trick those unaware of how private keys work and their requirements to send funds.

database design: how can I populate a foreign key value after creating the first table entry referenced by the foreign key?

I'm looking to create an online store, so I got to the definition of the database. I want to have as few tables as possible, so I reduced them to:

  1. The users
  2. products
  3. Orders
  4. Cart_Articles

I came up with the following scheme: image

The logic goes like this: For each product added to the cart, a new Cart_Item entry is created. But the Cart_Item entry needs to fill in the foreign key that references the Order table, which is cartItemOrderID. Since no order has been created, it will have to be null at first. Once the user adds all of their desired items to the cart, they place the order and a new order is created, so I now have the order ID. How would I pass this order ID to the entries in the Cart_Item table since there is no way of knowing if they were placed by the current user?

I am missing something huge but I can't point it out.

gnupg – gpg – Unable to import public key from asc file

The title says it all. I am using Windows 10 Home with GPG version 2.2.19.

Every time I try to import the asc file to Tor Browser using the command gpg --import torbrowser-install-win64-9.0.7_en-US.exe.asc, I get this elegant error:

gpg: no valid OpenPGP data found.

Similarly, this also occurs when trying to verify the installer with the key file using the command gpg --verify torbrowser-install-win64-9.0.7_en-US.exe.asc torbrowser-install-win64-9.0.7_en-US.exe:

gpg: Signature made 03/22/20 10:42:09 Eastern Daylight Time
gpg:                using RSA key EB774491D9FF06E2
gpg: Can't check signature: No public key

Testing the answers in the tons of other guides here has not helped at all. Can i get help

How can you implement infinite lexicon sorting as a Python key function?

I am implementing an algorithm that forces me to order infinitely repeating words. In the regular lexicographic order, "prohibition" comes before "banana", but in infinite lexicographic order it is the other way around, since "bananabananabanana …" has an "a" as its fourth character, while "banbanbanban … "has a b.

Writing a comparison function to compare words in this way is not that difficult. However, Python 3 doesn't take comparison functions in its sort function, instead it takes an indexing function, which is supposed to save the calculation since it is only called once per item.

The standard library provides a workaround at functools.cmp_to_key. I have tried this and it works, but it seems to be very slow.

Is there a clever way to implement infinite lexorder sorting as an index function?

keyboard: What is the name of the Page Down key when using EventHandler?

I want to trap the PageDown event in an EventHandler. The code I have written works fine for eg "RightArrowKeyDown". But for the life of me I can't find the label for the Page Down key. I've tried "PageDownKeyDown" and variations using Pg and Dn but none of these seem to work. There is also no documentation on the key labels other than the keys explicitly mentioned on the EventHandler help page.

Does anyone know which tag to use?

Thank you