intel / intel/confidential-computing.sgx.sdk
The issue on ECDSA
- Dominant language
- C++
- Stars
- 2
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I think the parameters used by SGX should be:
```
GX = 0x6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296;
GY = 0x4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5;
AA = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC;
BB = 0x5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B;
PP = 0xFFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF;
NN = 0xFFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551;
```
Through the `sgx_ecc256_create_key_pair`function, the key I obtained is:
```
sk:
abc284b60e61f2ced65603c41641922ada1caffb891b1bc4e93cfe0ba597537e
pk.gx:
5560b6f697cfafb011e80d2ad18cb1a2c4a9d556029c4b1035f2adfcec95ab3a
pk.gy:
76e1c5d3ff46376ae9dcdc95faffaef8aec488d230ef8d92c4d2738c3e4fd87c
```
After converting to little-endian:
```
sk:
7e5397a50bfe3ce9c41b1b89fbaf1cda2a924116c40356d6cef2610eb684c2ab
pk.gx:
3aab95ecfcadf235104b9c0256d5a9c4a2b18cd12a0de811b0afcf97f6b66055
pk.gy:
7cd84f3e8c73d2c4928def30d288c4aef8aefffa95dcdce96a3746ffd3c5e176
```
However, When I calculate the public key using functions other than those in SGX.I am unable to calculate with the value
`7e5397a50bfe3ce9c41b1b89fbaf1cda2a924116c40356d6cef2610eb684c2ab`:
```
pk.gx:
3aab95ecfcadf235104b9c0256d5a9c4a2b18cd12a0de811b0afcf97f6b66055
pk.gy:
7cd84f3e8c73d2c4928def30d288c4aef8aefffa95dcdce96a3746ffd3c5e176
```
In this way, I am unable to further verify the signature. I am a beginner, please help me.Is it a problem with endianness conversion?
Contributor guide
Research direction
Start by reproducing the key pair with `sgx_ecc256_create_key_pair` and compare its output with the external ECDSA implementation using the supplied P-256 parameters and values. Check the documented byte order for the private key and public coordinates; done means identifying whether the mismatch is an endianness or representation issue and establishing values that permit signature verification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cryptography, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100