no-`alloc` core-only "heapless" support

Open
#51 15 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
cryptography

Research direction

Start by reading PR #22 to understand the existing core+alloc work, then trace how num-bigint-dig is represented and used throughout the RSA crate. Evaluate stack-allocated representations such as GenericArray or ArrayVec versus slice references, including the required lifetimes. Done means the crate works in core-only environments and all operations remain within defined numeric bounds.

Written by the indexing model from the issue text.

Description

enhancement

Right now, there is a PR open (#22) that will allow the RSA crate to be used in core+alloc environments (e.g. environments without libstd, but where a dynamic allocator is available).

The next step is for the RSA crate to support core-only environments. This would require multiple changes: num-bigint-dig would need to be represented either as a stack-allocated array (GenericArray? ArrayVec?) or a slice reference (wooo lifetimes) instead of a heap-allocated vector. Furthermore, we'll need to make extra sure that all the operations are bounded within a certain numeric range.

Dominant language
Rust
Stars
673
Forks
190
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RustCrypto/RSA

All issues in RustCrypto/RSA

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.