Questions tagged [apple-cryptokit]

52 questions
0
votes
0 answers

How to create a Secure QRCode in Swift that can be only scan by a single app?

How to create a Secure QRCode in Swift that can be only scan by a single app? Can we encrypt and decrypt the QRCode values using sha56?
0
votes
0 answers

How to generate Curve 25519 key pair with ECDH swift iOS?

I want to generate a Curve25519 key pair with ECDH for the encryption and decryption. I'm using the CryptoKit to generates a keypair. But, I failed to generate a keypair with the ECDH algorithm. Swift func generateKeys() -> (publicKey: String,…
0
votes
1 answer

CryptoKit - Encrypt with public key?

To give you the context, there is a developer who develops the API of the project and there is a part of the json that will be encrypted. So I have to decipher his content. He has listed all the functions that I will need on the iOs side. So I have…
Insou
  • 1,303
  • 1
  • 13
  • 17
0
votes
1 answer

Problem using P256.Signing.PublicKey on iOS

I generated a public/private key pair using the following commands: openssl ecparam -genkey -name secp256k1 -noout -out private.pem openssl ec -in private.pem -text -noout This generates the following result (don't worry, private key is for testing…
Joris Mans
  • 6,024
  • 6
  • 42
  • 69
0
votes
1 answer

iOS CryptoKit AES-GCM is it possible to use a nonce with fewer than 12 bytes?

I am attempting to interface with an existing device that uses AES-GCM with a 4-byte nonce (UInt32). This is a simple incremental counter that increases each time an operation occurs: var cryptoCounter: UInt32 = 0 I then attempt to encrypt it and…
Sam Holmes
  • 1,594
  • 13
  • 31
0
votes
2 answers

iOS - how to perform sharedSecretFromKeyAgreement in iOS 12

Recently Apple with iOS 13 introduced CryptoKit which has a method sharedSecretFromKeyAgreement which generates a shared secret from key agreement between public and private keys. How can this be achieved in iOS 12 and below ? iOS 13 import…
Max
  • 5,380
  • 6
  • 42
  • 66
-2
votes
3 answers

Decrypting value encrypted by crypto kit from Web Service - Symmetric Key? - UPDATED with full working code below

How do I decrypt my iOS CryptoKit encrypted value on the web service side? Similar to this SO question: CryptoKit in Java Or this SO question Can I create my own SymmetricKey that we both know the string of? How can my value be decrypted in Java…
devjme
  • 684
  • 6
  • 12
1 2 3
4