Closed Oighty closed 6 months ago
Comment from previous PR on reasoning for ECIES
Alternate encryption scheme to replace the RSA-based one: ECIES using BN254 (aka alt_bn128) curve
The two main issues with RSA are:
In this version, we use a simplified version of the Elliptic Curve Integrated Encryption Scheme (ECIES) where the auction creator provides a public key on the AltBN128 curve. Bidders create a shared key off-chain and conceal it using the public key of the auction. To settle, the private key for the auction can be provided and the encrypted amounts out can be decrypted directly using the AltBN128 ecMul precompile for ~6,000 gas. We use a simple, hash-based key derivation function and XOR encryption, which are weak by themselves, but are likely sufficient behind the EC public key cryptography.
Closing this PR to focus on #46 . All changes here were merged into 46.
Per recent conversations about needing to support more potential winning bidders (up to 10,000 as opposed to the current limit of around 400), this PR creates a standalone EMPA contract that avoids several costly operations:
settle
function (e.g. seller payment/refund, curator, partial bid fill). As a result, most bidders (win or lose) must claim their payout/refund after the auction is settled.