Skip to main content

Questions tagged [cryptography]

Questions regarding Mathematica cryptography related functionality (introduced in Mathematica 10).

Filter by
Sorted by
Tagged with
2 votes
0 answers
58 views

Where is SystemCredential stored on Windows? [closed]

Where is SystemCredential stored on Windows by default? (if stored in registry what is the registry path and if stored inside a file what is the file path). Is it ...
user13892's user avatar
  • 9,651
0 votes
0 answers
60 views

Understanding and Fixing Image Encryption Using Henon Map Resulting in Original Image, Not Encrypted Image

I'm reaching out to this community in my quest to understand and improve an image encryption process using the Henon map. I have created the following Mathematica code to encrypt an image: ...
zeraoulia rafik's user avatar
2 votes
0 answers
100 views

Mathematica Implementations of Post Quantum Cryptography Algorithms?

Mathematica supports several cryptographic commands like Encrypt, Decrypt and others. This includes support for asymmetric signature ciphers like RSA and Elliptic curves and symmetric ciphers like &...
Moo's user avatar
  • 3,410
3 votes
1 answer
354 views

Computing point operations on an elliptic curve over a finite field [duplicate]

I'm working on a homework problem that asks you to compute $1943(1980,431)$, where $p = 2671$, $E:Y^2=X^3+171X+853$, and $P=(1980,431) \in E(F_{2671})$. I found the ternary expansion of $1943$ to be $...
Karam 's user avatar
  • 197
1 vote
1 answer
170 views

Find prime numbers two prime numbers given a certain constraint

The question is: Find primenumbers p and q if n=pq=39247771 and φ(n) = 39233944. Does anyone have an idea of how to approach this problem in mathematica? Thanks in advance
Lentato's user avatar
  • 73
1 vote
0 answers
73 views

What exactly are the square images generated from Encryption?

i.e. GenerateDerivedKey[] or Encrypt[] gives you a byte array with an 8 by 8 color grid that seems to represents a unique code ...
Sangwoo Han's user avatar
2 votes
0 answers
70 views

With v12.2, how to call gpg (or gpg4win) and tell it to generate RSA key pair and to return private and public key blocks and fingerprint?

Using Mathematica v12.2, is it possible to call gpg (or gpg4win) and then tell it to generate an RSA key pair and to return private and public PGP key blocks in standand format and the 40 hex-...
tell's user avatar
  • 320
0 votes
1 answer
148 views

How to use every number between 2^50 and 2^100 without having to rewrite the code? [closed]

What I have currently written returns a numerical value and stores it in b100. p and q are random integers of size 2^50. I want to use the same code to calculate values where p and q ranges from 2^50 -...
Dyson's user avatar
  • 31
0 votes
1 answer
80 views

How do I convert an encrypted RSA message cipher output into a matrix table?

...
Dyson's user avatar
  • 31
0 votes
1 answer
244 views

How to decrypt a signed RSA message without using private/public key in Mathematica?

...
Dyson's user avatar
  • 31
2 votes
0 answers
123 views

BlockchainBlockData request limit exceeded

I'm trying to replicate this Blog entry on Bitcoin queries: https://blog.wolfram.com/2021/05/25/sleuthing-darkside-crypto-ransom-payments-with-the-wolfram-language/ However, I don't get very far ...
spore234's user avatar
  • 601
2 votes
1 answer
977 views

How to return two values from function

I have a function that generates cipher text for ElGamal encryption and I want to make return two values, but it returns only one. This is the code: ...
John Carter's user avatar
2 votes
0 answers
91 views

Ways to hide a secret token with some code?

I worked out a way to prompt notifications to peopel using my mathematica code that a new version is available. My code is in a private github repository, mathematica can access it using http requests ...
Giorgio Busoni's user avatar
3 votes
2 answers
155 views

HMAC SHA256 implementation in Mathematica 11.3

I need a HMAC SHA implementation for Mathematica for an API authentication. I am not experienced at all in cryptography, hash functions, and HMAC. So far what I found is this: ...
Oleg's user avatar
  • 131
7 votes
1 answer
608 views

How to get v12.0 to print PGP public key and secret key BLOCKS after generating a key pair using GenerateAsymmetricKeyPair[]?

This question is related to, but not the same as, two others I recently asked about using Mathematica's PGP functionality: "After using GenerateAsymmetricKeyPair[], how to print the two keys in ...
ool's user avatar
  • 45
1 vote
1 answer
115 views

Given a PGP public key, how can I extract its PGP fingerprint in hex, using v12.0?

This is related to the question "After using GenerateAsymmetricKeyPair [], how to print the two keys in hex?" which @Sjoerd Smit kindly answered. How can I use Mathematica v12.0 to extract ...
ool's user avatar
  • 45
0 votes
1 answer
122 views

After using GenerateAsymmetricKeyPair[], how to print the two keys in hex?

After using GenerateAsymmetricKeyPair in Mathematica 12, how can I print the two keys in hex? There is probably a simple answer that I'm missing, but there's ...
ool's user avatar
  • 45
2 votes
2 answers
116 views

Finding Mnemonics for expressions with lots of indices

One of the equations I work with in my research are the pentagon equations: ...
Gert's user avatar
  • 1,620
1 vote
0 answers
44 views

Cannot find CEL ethereum token

I am trying to get information aobut the Celsius token (CEL, https://etherscan.io/token/0xaaaebe6fe48e54f431b0c390cfaf0b017d09d42d) in Mathematica. However, it seems like it is not working. These ...
José D.'s user avatar
  • 1,135
2 votes
0 answers
99 views

Sound steganography with `InverseSpectrogram`

Here is my code of how to hide a message inside a sound: ...
azerbajdzan's user avatar
  • 20.9k
5 votes
1 answer
601 views

RSA encryption/decryption with signed message

I was going through a book with some tasks that you can work with mathematica on, and I found this particular task interesting: Proffesor Alice has sent an assignment to Bob, one of her students. To ...
Vetenskap's user avatar
  • 199
5 votes
2 answers
253 views

How to permute elements in a list

I am attempting to decrypt a ciphertext. I split the cipher into blocks of five, and now I want to permute each individual block. My goal is to be able to permute each individual block by the same ...
Nathaniel Lackey's user avatar
1 vote
1 answer
68 views

How can I add a different value to each item in a list?

I am trying to decrypt a modified Vigenère cipher text. I am unfamiliar with Mathematica, so I need some guidance. Here is what I want: ...
Nathaniel Lackey's user avatar
6 votes
1 answer
146 views

How do I generate a JSON Web Token?

I want to access a service that uses JWT authentication for its API. Generating a JWT doesn't look too difficult, it is a combination of BASE64URL encoding, and HMAC Signing. However, these things can ...
Andy Burnett's user avatar
2 votes
1 answer
183 views

How do I use mathematica for encryption if someone gave me their Public Key in PGP format?

How do I do Mathematica to a encrypt a message when someone has given me their public PGP key? Does Mathematica have this functionality? Could I use Mathematica ...
IntroductionToProbability's user avatar
2 votes
2 answers
769 views

Couldn't load OpenSSL library in 12.1 (Windows)

Update: Finally I found a clumsy way to solve this bug by myself: I created an alternate local kernel to run the code, and it surprisingly works out! It is ridiculous that two local kernels contain ...
Pei-Xin Shen's user avatar
2 votes
1 answer
82 views

how to scramble and then unscramble a list of elements?

list = {"a", "b", "c", "d"}; scrambledList=scramble[list] {"b", "d", "a", "c"} unscramble[scrambledList] {"a", "b", "c"...
Conor Cosnett's user avatar
0 votes
1 answer
67 views

How do determine whether an entry in a Blockchain was submitted by myself?

Let say I have a Blockchain id id as below:- ...
H42's user avatar
  • 3,479
11 votes
2 answers
340 views

What are some use cases of Wolfram Blockchain?

In version 11.3, Mathematica introduces the blockchain module, together with a "Wolfram blockchain". There were mainly three functions available for users: store an expression (no larger than 8M) to ...
vapor's user avatar
  • 7,911
3 votes
1 answer
188 views

Number theory in Mathematica

Is there any book out there similar to S. Wagon's Mathematica in Action that has problems/exercises/projects in the field of number theory as done in Mathematica? If not pure number theory, at least ...
Kandrax's user avatar
  • 77
2 votes
1 answer
54 views

User Implemented SHA-1 is failing for strings of length >512 bits

So, earlier, I posed a question regarding getting a user implemented SHA-1 hash function to work correctly. Well, I fixed the problems, cleaned it up a little bit, but now I have the problem for when ...
Shinaolord's user avatar
3 votes
1 answer
152 views

User implemented SHA-1 isn't outputting correct hash

EDIT: I'm actually Thinking the issue is in the initialization phase, where we pad the message with 1's, 0's, and the message ...
Shinaolord's user avatar
2 votes
1 answer
94 views

Applying Polybius cypher [closed]

I need to define a function that can apply the Polybius cypher encoding technique. I did some very basic case with if statement, however, if the input is random with A and B I have no idea how to ...
Denny Shen's user avatar
1 vote
0 answers
53 views

Keyed Hash for HMAC SHA256 [duplicate]

I'm trying to use AWS REST API's (because I can't rely on AWSLink`). The sample C# code from Amazon uses this a lot: ...
Eric William Smith's user avatar
0 votes
1 answer
85 views

What is the best build-in function to pick or select given element in a huge list

im looking for a best and efficient function works like a search engine it takes for example m=5+6I ,then it goes searching in the list V={1,1+I,2+3I,...} until catch it . My Dr said to use "Select[]"...
Ramez Hindi's user avatar
4 votes
1 answer
152 views

Can Decrypt[] be forced to decrypt with a different key?

Decrypt[] will yield an error if one tries to decrypt a byte array using a different symmetric key than the one used to encrypt: ...
Sixty's user avatar
  • 41
1 vote
1 answer
532 views

How to construct addition and multiplication table for finite field?

For example, choose $p(X) = X^4 + X + 1$, how to construct addition and multiplication tables for $\mathbb{F}_{2}[X] \mod{X^4 + X + 1} $ ?
Gan Sama's user avatar
6 votes
0 answers
350 views

How to mine Bitcoins in Mathematica?

I see that version 11.3 has some blockchain functionalities, so is there a way to mine for bitcoins in Mathematica? Perhaps someone could provide a tutorial of the APIs to call and computations ...
user5601's user avatar
  • 3,780
1 vote
1 answer
79 views

Is this decryption function idiomatic?

This is my first non-trivial Mathematica notebook, which I wrote for a cryptology homework. It encrypts/decrypts strings using an affine cipher. Is the code readable/idiomatic? How could it be ...
Elliot Gorokhovsky's user avatar
4 votes
1 answer
255 views

Why is there a lot of noise in the Wolfram Blockchain?

I tried to look into the transaction history of the Wolfram Blockchain. I tried this:- ...
H42's user avatar
  • 3,479
4 votes
1 answer
129 views

How to find the block number of a transaction in a Wolfram Blockchain?

For example, in block 1004 of the Wolfram Blockchain, I can get the 4th transaction's ID by using the following code:- ...
H42's user avatar
  • 3,479
2 votes
1 answer
123 views

Nested BlockchainBlockData fail

New 11.3 functions to query blockchains. In trying to build a block link by iterative lookup, this function works for several iterations then fails: ...
alancalvitti's user avatar
  • 15.2k
19 votes
1 answer
555 views

HMAC correct on 11.2 but wrong and different on 11.3 running same code

If you run this code on 11.2 ...
Ray Troy's user avatar
  • 1,299
4 votes
2 answers
175 views

J/Link HMAC Base64

I am trying to recreate a Java algorithm in Mathematica. It is taking a key and signing a message using the HMAC and SHA256 algorithm. The Java code for which I am basing it off is here I have ...
Ray Troy's user avatar
  • 1,299
6 votes
1 answer
264 views

Is it possible to convert the output of the Encrypt[] function into binary digits?

I use the following code to generate a key and then use it to encrypt a simple string message. The output of the function Encrypt is an encrypted object. But I would rather convert this into binary ...
user3318424's user avatar
5 votes
1 answer
69 views

Can't use keys of less that 64 bits long

Probably a bug: key = GenerateSymmetricKey[ Method -> <|"Cipher" -> "Blowfish", "KeySize" -> 16|>] Encrypt[key, "test"] ...
swish's user avatar
  • 7,931
4 votes
1 answer
99 views

Why can't Encrypt handle messages bigger than very small?

This keys = GenerateAsymmetricKeyPair[]; message = Rasterize[Graphics[Disk[]], RasterSize -> 10]; Encrypt[keys["PrivateKey"], message] generates the error <...
CarbonFlambe's user avatar
  • 1,244
3 votes
1 answer
87 views

Can I make a SymmetricKey with my own key value?

Mathematica has a function that one can use like this GenerateSymmetricKey[Method -> <|"Cipher" -> "AES128", "BlockMode" -> "CBC"|>] but it picks ...
kgk's user avatar
  • 31
1 vote
1 answer
144 views

Decoding Message-Signature Pairs

I've been given a set of message-signature pairs to decrypt using a public RSA key I set up. I need to sort through the decoded messages, and find which of those have a valid signature. My public key ...
HattieS's user avatar
  • 41
4 votes
0 answers
853 views

Code Review: ECDSA for Mathematica

The code below contains functions related to ECDSA (Elliptic Curve Digital Signature Algorithm) with standard parameters secp256k1. The implementation is based on ...
Mark Messa's user avatar