# Install msieve with Homebrew, MacPorts, Nix

C library for factoring large integers. Version 1.53 via Homebrew; verified from local package data. Also installable with nix: nix profile install nixpkgs#msieve.

## Install

```sh
sudo av install brew:msieve
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install msieve
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install msieve
```

  Evidence: MacPorts ports tree: math/msieve/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#msieve
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ms/msieve/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:msieve
- **Package manager:** Homebrew
- **Version:** 1.53
- **Source summary:** C library for factoring large integers
- **Homepage:** <https://sourceforge.net/projects/msieve/>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- msieve (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.53
## Project history and usage

Msieve is Jason Papadopoulos's public-domain C library and command-line program for integer factorization. Its README frames the project as an effort to understand and optimize modern factoring algorithms, with a self-contained implementation intended to be fast, portable, and simple to use. The library combines trial division and Pollard Rho for small cases, optional GMP-ECM for P-1, P+1, and ECM work, then sieve-based methods for harder inputs.

### Project history

Technically, Msieve's niche is high-performance general integer factorization rather than a broad computer-algebra environment. It implements a self-initializing quadratic sieve for ordinary use and includes number-field-sieve code, especially postprocessing, that the author says helped complete large public factorization efforts. Its CLI can factor numbers supplied directly, from files, or as arithmetic expressions, while the library can be embedded by other programs.

### How it is used

In the factoring ecosystem, Msieve sits beside tools such as GGNFS, CADO-NFS, and YAFU. Its README describes using GGNFS for earlier NFS stages and Msieve for later stages on very large problems, and YAFU's build notes document bundling msieve as part of YAFU 3.0. Package-manager records for Homebrew, MacPorts, and Nix place it as a specialist science/cryptography utility rather than a general-purpose math suite.

### Sources

- <https://formulae.brew.sh/formula/msieve>
- <https://github.com/bbuhrow/yafu>
- <https://github.com/radii/msieve>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Other Package-Manager Records

- Nix - msieve: normalized package name match | nixpkgs package indexes: pkgs/by-name/ms/msieve/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - msieve: normalized package name match | MacPorts ports tree: math/msieve/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/msieve.yml](https://github.com/mxcl/pkgdb/blob/main/combined/msieve.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
