Prevent encryption operations to use swap files
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- haskell
- Domain
- cryptography, security
Research direction
Start by reading the affected functions in Wallet.hs and Encrypted.hs, then review how Unix mlock and Win32 VirtualLock could apply to their memory operations. Determine the platform-specific scope and verify that passphrases and private keys used by the listed encryption functions cannot reach swap files.
Written by the indexing model from the issue text.
Description
I believe many of the encryption operations that are being done in memory could reach the disk if any wallet/node uses any encryption function whilst having a full memory. This would result in passphrases and private keys reaching swap files on disk, making it possible to access them.
Some of the affected functions include: generateNew , xPrvChangePass in Wallet.hs and encryptedKey,encryptedCreate,encryptedCreateDirectWithTweak,encryptedChangePass,encryptedSign in Encrypted.hs
In summary ensuring that encryption functions are done in memory will avoid the posibility of passphrases/keys being leaked into the disk and therefore susceptible to be stolen. A possible solution would be using mlock in unix and VirtualLock in Win32, which locks some memory space and ensures that some operations will always be executed in memory.
- Dominant language
- C
- Stars
- 68
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntersectMBO/cardano-crypto
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
IntersectMBO/cardano-crypto#102 ·
-
audit :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
IntersectMBO/cardano-crypto#93 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in IntersectMBO/cardano-crypto
Similar issues
-
build: man page directory doubledPossibly taken @zeusgoose claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
ATtiny xy2: Missing #else path may lead to inconsistencies in core digital_pin_to_timer[] arrayOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SpenceKonde/megaTinyCore#1294 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ROCm/rocm-libraries#15866 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
adafruit/circuitpython#11877 ·
Maintainers usually reply within 1 day