{"uid":"cap_sTk1prV_kA8Ri_vkiR632","slug":"crypto-math-rsa-arithmetic-fdadbf3a","name":"Crypto Math RSA Arithmetic","description":"RSA public key arithmetic: modulus bits, exponent validity, NIST strength; or a labelled toy RSA with tiny primes.","url":"https://crypto-math.x402tookit.com/rsa-arith?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["mode"],"properties":{"e":{"type":"string","description":"public exponent (default 65537; required in toy mode)"},"n":{"type":"string","description":"public mode: the PUBLIC modulus, decimal or 0x hex, up to 8192 bits"},"p":{"type":"string","description":"toy mode: first tiny prime, below 65536"},"q":{"type":"string","description":"toy mode: second tiny prime, below 65536"},"mode":{"type":"string","description":"public (check a public modulus n and exponent e) or toy (educational RSA from tiny primes p and q)"},"message":{"type":"string","description":"toy mode: a small integer below n to encrypt and decrypt, to show the round trip"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"d":{"type":["null","string"]},"e":{"type":["null","string"]},"n":{"type":["null","string"]},"phi":{"type":["null","string"]},"asOf":{"type":["null","string"]},"steps":{"type":["array","null"],"items":{"type":"string"}},"source":{"type":["null","string"]},"message":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"decrypted":{"type":["null","string"]},"roundTrip":{"type":["boolean","null"]},"ciphertext":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"dCarmichael":{"type":["null","string"]},"educationalOnly":{"type":["boolean","null"]},"carmichaelLambda":{"type":["null","string"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_9WMXNSgPkWL2wo4I39Dkd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes RSA public key parameters (modulus bits, exponent validity, NIST strength) or demonstrates a toy RSA encryption/decryption round-trip using tiny primes.","exampleAgentPrompt":"Check my RSA public key in public mode — the modulus is 0xC4A6B... (2048-bit hex) and the exponent is 65537 — tell me if it meets NIST strength requirements and whether the exponent is valid.","exampleUseCases":[{"title":"Validate production RSA key strength","prompt":"I have an RSA public key with modulus n=<big decimal number> and exponent e=65537 — run it in public mode and tell me if it meets NIST strength standards and what the bit length is."},{"title":"Toy RSA round-trip for a class demo","prompt":"Show me a toy RSA example using primes p=61 and q=53 with exponent e=17, and encrypt the message 65 so I can see the full encrypt/decrypt round-trip with all the steps."},{"title":"Educational RSA key generation walkthrough","prompt":"Walk me through RSA key generation in toy mode with p=89 and q=97, and show me phi, the Carmichael lambda, and the computed private exponent d."}],"resultDescription":"Returns a structured object with: verdict on key strength (pass/fail/degraded), modulus bit length, NIST security assessment, exponent validity, reasons for any failures, and in toy mode also phi(n), Carmichael lambda, private exponent d, ciphertext, decrypted value, round-trip boolean, and step-by-step educational explanation.","failureModes":["Invalid or malformed modulus (non-numeric or wrong format) returns an error","Exponent fails validity checks (even, too small, or not coprime with phi) returns reasons array","Toy mode primes p or q exceed 65536 limit returns validation error","Toy mode message integer >= n causes an out-of-range error","Missing required 'mode' query parameter returns schema validation error","Modulus too large (>8192 bits) returns size limit error"],"whenToPreferThis":"Use this endpoint when you need to programmatically assess RSA public key security (NIST compliance, bit strength, exponent validity) or need an educational step-by-step RSA demonstration with small primes. Prefer this over general modular exponentiation endpoints when RSA-specific outputs like phi, Carmichael lambda, NIST verdict, and labeled key components are needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T06:30:53.763Z","isFirstParty":false,"canonicalSlug":"crypto-math-rsa-arithmetic-fdadbf3a"}