{
  "_id": "6a2d2ca83efcd9bda42f983b",
  "Package": "mx.crypto",
  "Type": "Package",
  "Title": "Matrix End-to-End Encryption Primitives",
  "Version": "0.2.0",
  "Date": "2026-05-13",
  "Authors@R": "c(\nperson(\"Troy\", \"Hernandez\", role = c(\"aut\", \"cre\"),\nemail = \"troy@cornball.ai\",\ncomment = c(ORCID = \"0009-0005-4248-604X\")),\nperson(\"cornball.ai\", role = \"cph\"),\nperson(\"The Matrix.org Foundation C.I.C.\", role = c(\"ctb\", \"cph\"),\ncomment = \"Authors of the bundled 'vodozemac' Rust crate; see inst/AUTHORS\"),\nperson(\"Authors of the dependency Rust crates\", role = \"ctb\",\ncomment = \"see inst/AUTHORS for details\"))",
  "Description": "'Olm' and 'Megolm' encryption ratchet primitives for the\n'Matrix' messaging protocol <https://matrix.org/>, wrapping the\n'vodozemac' Rust crate. Provides device-key generation,\none-time-key management, 1:1 'Olm' sessions, and 'Megolm' group\nsessions. Pairs with the 'mx.api' package, which handles\n'Matrix' HTTP transport.",
  "License": "MIT + file LICENSE | Apache License 2.0",
  "URL": "https://github.com/cornball-ai/mx.crypto",
  "BugReports": "https://github.com/cornball-ai/mx.crypto/issues",
  "SystemRequirements": "Cargo (Rust's package manager), rustc (>= 1.85)",
  "VignetteBuilder": "simplermarkdown",
  "Encoding": "UTF-8",
  "Config/pak/sysreqs": "libclang-dev",
  "Repository": "https://cornball-ai.r-universe.dev",
  "Date/Publication": "2026-05-13 21:12:17 UTC",
  "RemoteUrl": "https://github.com/cornball-ai/mx.crypto",
  "RemoteRef": "HEAD",
  "RemoteSha": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-06-13 10:02:10 UTC",
    "User": "root"
  },
  "Author": "Troy Hernandez [aut, cre] (ORCID:\n<https://orcid.org/0009-0005-4248-604X>),\ncornball.ai [cph],\nThe Matrix.org Foundation C.I.C. [ctb, cph] (Authors of the bundled\n'vodozemac' Rust crate; see inst/AUTHORS),\nAuthors of the dependency Rust crates [ctb] (see inst/AUTHORS for\ndetails)",
  "Maintainer": "Troy Hernandez <troy@cornball.ai>",
  "MD5sum": "6ef0f9096e36f46555e96676e980fb14",
  "_user": "cornball-ai",
  "_type": "src",
  "_file": "mx.crypto_0.2.0.tar.gz",
  "_fileid": "2044f267480deeb9e7c33288a84c5f74d263b09baa4b3154f3593c04509433d9",
  "_filesize": 5868027,
  "_sha256": "2044f267480deeb9e7c33288a84c5f74d263b09baa4b3154f3593c04509433d9",
  "_created": "2026-06-13T10:02:10.000Z",
  "_published": "2026-06-13T10:10:48.761Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 81181958876,
      "time": 149,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7609768557"
    },
    {
      "job": 81181958878,
      "time": 159,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7609769592"
    },
    {
      "job": 81181958909,
      "time": 160,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7609769805"
    },
    {
      "job": 81181958881,
      "time": 153,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7609769073"
    },
    {
      "job": 81181958901,
      "time": 116,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7609764184"
    },
    {
      "job": 81181958920,
      "time": 442,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7609805363"
    },
    {
      "job": 81181958891,
      "time": 120,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7609764706"
    },
    {
      "job": 81181958889,
      "time": 227,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7609778374"
    },
    {
      "job": 81181693702,
      "time": 251,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7609749222"
    },
    {
      "job": 81181958871,
      "time": 140,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7609767335"
    },
    {
      "job": 81181958886,
      "time": 176,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7609771744"
    },
    {
      "job": 81181958870,
      "time": 123,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7609765104"
    },
    {
      "job": 81181958884,
      "time": 178,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7609772059"
    }
  ],
  "_buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cornball-ai/mx.crypto",
  "_commit": {
    "id": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
    "author": "Troy Hernandez <troy@cornball.ai>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Release 0.2.0: security audit + first CRAN submission prep (#2)\n\n* Propagate SessionCreationError + add signature verify primitives\n\nTwo security fixes in one audit pass:\n\n1. mxc_olm_create_outbound() now propagates vodozemac's\n   SessionCreationError instead of silently encoding a\n   Result<Session, SessionCreationError> as a Session externalptr.\n   The previous behavior was a latent memory-safety bug: on the\n   happy path it worked by Rust enum layout coincidence; on the\n   error path (e.g. an all-zero curve25519 key fed via /keys/claim)\n   it produced an externalptr that downstream code dereferenced as\n   Session, with undefined results (observed: R hangs/aborts). The\n   fix is a single .stop_str(...) on the Result.\n\n   vodozemac 0.10.0 already rejects non-contributory Diffie-Hellman\n   internally (Soatok 2026-02 disclosure was patched upstream), so\n   the underlying attack is foiled at the primitive level. The\n   wrapper-level fix here ensures callers actually see the\n   rejection rather than silent corruption.\n\n2. New ed25519 verification surface: mxc_ed25519_verify (Rust,\n   verify_strict), mxc_verify_device_keys (R, full structural +\n   signature check for /keys/query device entries), and\n   mxc_verify_one_time_key (R, for /keys/claim). Before this,\n   mx.crypto had mxc_account_sign but no verification counterpart,\n   so callers (including the integration demo) trusted homeserver-\n   supplied keys unconditionally.\n\n   The R helpers fail closed: any structural problem, signer\n   mismatch, or signature-bytes mismatch raises rather than\n   returning a \"partially valid\" object. mxc_verify_device_keys\n   does NOT pin identities -- that belongs to a higher layer\n   (TOFU + cross-signing) -- and its docstring says so explicitly.\n\ninst/tinytest/test_verify.R: 25 assertions covering the\nnon-contributory regression, valid-and-tampered ed25519 round\ntrips, and every hostile-homeserver rejection branch for both\nverify helpers (wrong user, wrong device, missing keys, no\ns",
    "time": 1778706737
  },
  "_maintainer": {
    "name": "Troy Hernandez",
    "email": "troy@cornball.ai",
    "login": "troyhernandez",
    "description": "",
    "uuid": 5670773
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.3",
      "role": "Depends"
    },
    {
      "package": "tinytest",
      "role": "Suggests"
    },
    {
      "package": "mx.api",
      "version": ">= 0.2.0",
      "role": "Suggests"
    },
    {
      "package": "simplermarkdown",
      "role": "Suggests"
    }
  ],
  "_owner": "cornball-ai",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-17",
      "n": 5
    },
    {
      "week": "2026-20",
      "n": 2
    }
  ],
  "_tags": [
    {
      "name": "v0.1.0",
      "date": "2026-04-26"
    },
    {
      "name": "v0.2.0",
      "date": "2026-05-13"
    }
  ],
  "_stars": 2,
  "_contributors": [
    {
      "user": "troyhernandez",
      "count": 7,
      "uuid": 5670773
    }
  ],
  "_userbio": {
    "uuid": 153995987,
    "type": "organization",
    "name": "cornball.ai"
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/mx.crypto"
  },
  "_devurl": "https://github.com/cornball-ai/mx.crypto",
  "_searchresults": 0,
  "_cargo": true,
  "_topics": [
    "rust",
    "cargo"
  ],
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/mx.crypto.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/cornball-ai/mx.crypto",
  "_realowner": "cornball-ai",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.2.0",
      "date": "2026-06-12"
    }
  ],
  "_exports": [
    "mxc_account_fallback_key",
    "mxc_account_generate_one_time_keys",
    "mxc_account_identity_keys",
    "mxc_account_mark_published",
    "mxc_account_new",
    "mxc_account_one_time_keys",
    "mxc_account_pickle",
    "mxc_account_sign",
    "mxc_account_unpickle",
    "mxc_ed25519_verify",
    "mxc_megolm_decrypt",
    "mxc_megolm_encrypt",
    "mxc_megolm_inbound_new",
    "mxc_megolm_inbound_pickle",
    "mxc_megolm_inbound_unpickle",
    "mxc_megolm_outbound_info",
    "mxc_megolm_outbound_new",
    "mxc_megolm_outbound_pickle",
    "mxc_megolm_outbound_unpickle",
    "mxc_olm_create_inbound",
    "mxc_olm_create_outbound",
    "mxc_olm_decrypt",
    "mxc_olm_encrypt",
    "mxc_olm_session_pickle",
    "mxc_olm_session_unpickle",
    "mxc_verify_device_keys",
    "mxc_verify_one_time_key"
  ],
  "_help": [
    {
      "page": "mx.crypto-package",
      "title": "mx.crypto: Matrix End-to-End Encryption Primitives",
      "topics": [
        "mx.crypto-package",
        "mx.crypto"
      ]
    },
    {
      "page": "mxc_account_fallback_key",
      "title": "Generate and return a fallback key",
      "topics": [
        "mxc_account_fallback_key"
      ]
    },
    {
      "page": "mxc_account_generate_one_time_keys",
      "title": "Generate one-time keys",
      "topics": [
        "mxc_account_generate_one_time_keys"
      ]
    },
    {
      "page": "mxc_account_identity_keys",
      "title": "Public identity keys for an Account",
      "topics": [
        "mxc_account_identity_keys"
      ]
    },
    {
      "page": "mxc_account_mark_published",
      "title": "Mark current one-time keys as published",
      "topics": [
        "mxc_account_mark_published"
      ]
    },
    {
      "page": "mxc_account_new",
      "title": "Create a new Olm Account",
      "topics": [
        "mxc_account_new"
      ]
    },
    {
      "page": "mxc_account_one_time_keys",
      "title": "Read pending one-time keys",
      "topics": [
        "mxc_account_one_time_keys"
      ]
    },
    {
      "page": "mxc_account_pickle",
      "title": "Pickle an Account to an encrypted blob",
      "topics": [
        "mxc_account_pickle"
      ]
    },
    {
      "page": "mxc_account_sign",
      "title": "Sign canonical JSON with the Account's ed25519 key",
      "topics": [
        "mxc_account_sign"
      ]
    },
    {
      "page": "mxc_account_unpickle",
      "title": "Restore an Account from an encrypted pickle",
      "topics": [
        "mxc_account_unpickle"
      ]
    },
    {
      "page": "mxc_ed25519_verify",
      "title": "Verify an Ed25519 signature",
      "topics": [
        "mxc_ed25519_verify"
      ]
    },
    {
      "page": "mxc_megolm_decrypt",
      "title": "Decrypt a room message",
      "topics": [
        "mxc_megolm_decrypt"
      ]
    },
    {
      "page": "mxc_megolm_encrypt",
      "title": "Encrypt a room message",
      "topics": [
        "mxc_megolm_encrypt"
      ]
    },
    {
      "page": "mxc_megolm_inbound_new",
      "title": "Build an inbound Megolm session from a shared session_key",
      "topics": [
        "mxc_megolm_inbound_new"
      ]
    },
    {
      "page": "mxc_megolm_inbound_pickle",
      "title": "Pickle an inbound group session",
      "topics": [
        "mxc_megolm_inbound_pickle"
      ]
    },
    {
      "page": "mxc_megolm_inbound_unpickle",
      "title": "Restore an inbound group session from a pickle",
      "topics": [
        "mxc_megolm_inbound_unpickle"
      ]
    },
    {
      "page": "mxc_megolm_outbound_info",
      "title": "Inspect an outbound group session",
      "topics": [
        "mxc_megolm_outbound_info"
      ]
    },
    {
      "page": "mxc_megolm_outbound_new",
      "title": "Create an outbound Megolm group session",
      "topics": [
        "mxc_megolm_outbound_new"
      ]
    },
    {
      "page": "mxc_megolm_outbound_pickle",
      "title": "Pickle an outbound group session",
      "topics": [
        "mxc_megolm_outbound_pickle"
      ]
    },
    {
      "page": "mxc_megolm_outbound_unpickle",
      "title": "Restore an outbound group session from a pickle",
      "topics": [
        "mxc_megolm_outbound_unpickle"
      ]
    },
    {
      "page": "mxc_olm_create_inbound",
      "title": "Build an inbound Olm session from a pre-key message",
      "topics": [
        "mxc_olm_create_inbound"
      ]
    },
    {
      "page": "mxc_olm_create_outbound",
      "title": "Start an outbound Olm session",
      "topics": [
        "mxc_olm_create_outbound"
      ]
    },
    {
      "page": "mxc_olm_decrypt",
      "title": "Decrypt a message on an Olm session",
      "topics": [
        "mxc_olm_decrypt"
      ]
    },
    {
      "page": "mxc_olm_encrypt",
      "title": "Encrypt a message on an Olm session",
      "topics": [
        "mxc_olm_encrypt"
      ]
    },
    {
      "page": "mxc_olm_session_pickle",
      "title": "Pickle an Olm session",
      "topics": [
        "mxc_olm_session_pickle"
      ]
    },
    {
      "page": "mxc_olm_session_unpickle",
      "title": "Restore an Olm session from a pickle",
      "topics": [
        "mxc_olm_session_unpickle"
      ]
    },
    {
      "page": "mxc_verify_device_keys",
      "title": "Verify a Matrix device-keys object",
      "topics": [
        "mxc_verify_device_keys"
      ]
    },
    {
      "page": "mxc_verify_one_time_key",
      "title": "Verify a signed one-time / fallback key",
      "topics": [
        "mxc_verify_one_time_key"
      ]
    }
  ],
  "_readme": "https://github.com/cornball-ai/mx.crypto/raw/HEAD/README.md",
  "_rundeps": [],
  "_vignettes": [
    {
      "source": "security-audit.Rmd",
      "filename": "security-audit.html",
      "title": "Security audit (mx.crypto 0.2.0)",
      "engine": "simplermarkdown::mdweave_to_html",
      "headings": [
        "title: \"Security audit (mx.crypto 0.2.0)\"",
        "Security audit: mx.crypto 0.2.0",
        "1. Scope and threat model",
        "2. Dependency baseline: vodozemac 0.10.0",
        "3. Surface map",
        "4. Canonical JSON",
        "5. Finding (HIGH): mxc_olm_create_outbound swallowed SessionCreationError",
        "Reproducer (before the fix)",
        "Severity",
        "Fix",
        "Reproducer (after the fix)",
        "Same review on the rest of the surface",
        "6. Finding (HIGH): no signature-verification primitive",
        "Fix: three exports",
        "Hostile-homeserver fixtures",
        "What this does NOT cover",
        "7. DH / session error propagation (full pass)",
        "8. Pickle and local state",
        "9. Other Soatok findings, mapped to our pin",
        "10. API boundary with mx.api",
        "11. Pending follow-ups",
        "12. Verification",
        "Changelog"
      ],
      "created": "2026-05-13 21:12:17",
      "modified": "2026-05-13 21:12:17",
      "commits": 1
    }
  ],
  "_score": 4.301029995663981,
  "_indexed": true,
  "_nocasepkg": "mx.crypto",
  "_universes": [
    "cornball-ai",
    "troyhernandez"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.2.0",
      "date": "2026-06-13T10:04:58.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "9e81270bf22198069e0ba92f9e7e7e8a10926ea41194cb0de8becd8b6971e649",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.2.0",
      "date": "2026-06-13T10:05:00.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "cc8adf3fd9bc80007ec97a3738039414f1153353b4a63b6bd645c376a758caa7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.2.0",
      "date": "2026-06-13T10:05:03.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "3865ef966553eb58fecabc29d967873768c670e8e9b5e7d2ba2fc840c0dddc67",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.2.0",
      "date": "2026-06-13T10:04:57.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "367d3384a593cb03626497bfea39264de0ee920b579289bfed9366cc2ea613a0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.2.0",
      "date": "2026-06-13T10:04:21.000Z",
      "arch": "aarch64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "fac0b0bd251685793ccd34b89cb8d97abdd853b5b8351d66f196a4e007481d26",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.2.0",
      "date": "2026-06-13T10:08:42.000Z",
      "arch": "x86_64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "54203b80b6081ea00da9aedc2210b4424184bec4761d7167bfd54ec7ab97bbca",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.2.0",
      "date": "2026-06-13T10:04:23.000Z",
      "arch": "aarch64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "11af1bf48403a8dad7defe191490b913a6cef47d67eb653f8eb86367d34166ad",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.2.0",
      "date": "2026-06-13T10:05:26.000Z",
      "arch": "x86_64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "30f677041d8158166a5d4091b206f1f35b3b09e0936cedf4f2b781d49e9958fe",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.2.0",
      "date": "2026-06-13T10:04:57.000Z",
      "arch": "emscripten",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "15ae30ce158d6a56708fe7f04f75c1dccc8b08371603f46dfa7f6afe7e2af3cc",
      "status": "success",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.2.0",
      "date": "2026-06-13T10:04:16.000Z",
      "arch": "x86_64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "2d26e745034d9f9432a2cc0871c5c1d98898916add328c5e55f0f6d1cb4d6866",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.2.0",
      "date": "2026-06-13T10:04:02.000Z",
      "arch": "x86_64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "d1c3595adcf33b9b048b9f790251526df207cb0ab6e584d06df9c6280bb3a98a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.2.0",
      "date": "2026-06-13T10:04:15.000Z",
      "arch": "x86_64",
      "commit": "50620be65a3057a197e5ca0afaf5093d0465c0ba",
      "fileid": "27a78e0b10c4afd1fdfdd1b3d4a706aa9239f8908d7349b1752b8bd159873ef4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cornball-ai/actions/runs/27463547737"
    }
  ]
}