Questions tagged [pointycastle]

pointycastle is a Dart package for common cryptographic operations. Most of the classes are ports of Bouncy Castle from Java to Dart.

27 questions
0
votes
1 answer

AES CBC encryption with PKCS7 padding in Dart (Flutter): pkcs7.dart throws an error when the encrypted text does not require padding

I am trying to encrypt some text with AES CBC encryption with PKCS7 padding in Python and then decrypt it in Dart (Flutter). It turns out package:pointycastle/paddings/pkcs7.dart throws an error when the encrypted text does not require padding. Here…
Sergii
  • 587
  • 1
  • 5
  • 20
0
votes
2 answers

"AES engine not initialised" with pointycastle SecureRandom()

I want to generate a random BigInt with dynamik length Bits. I am using the pointycastle package to get a SecureRandom BigInt. import 'package:pointycastle/pointycastle.dart'; void main(List arguments) { print(gen(500)); } BigInt gen(int…
MindStudio
  • 706
  • 1
  • 4
  • 13
0
votes
0 answers

Dart Encryption of RSA private key

I'm writing a little library using the dart pointycastle library (based on the java bouncycastle). The libraries don't include any methods for writing a private key to disk. So I need to write the key to disk after first encrypting it with a pass…
Brett Sutton
  • 3,900
  • 2
  • 28
  • 53
0
votes
0 answers

Dart correct padding for AES Key

I'm building a simple encryption tool in dart. I need to encrypt my rsa private key with a pass phrase. I'm using AES to do the encryption. AES requires keys to be a specific no. of bits. In my case 256 bits. I'm requiring that the user enter a…
Brett Sutton
  • 3,900
  • 2
  • 28
  • 53
0
votes
1 answer

Dart: PointyCastle compute asynchronous

currently I'm trying to send credential Data to my Backend, therefore I want to hash the password for security purposes. But when I use the method PassCrypt().hashPass("", passwd, 48), the complete App freezes for nearly 1-2 seconds. Is there a way…
0
votes
1 answer

Dart - secret key generation method

I am looking for a dart package in order to implement key exchange protocol (Elliptic-curve Diffie–Hellman) in a Flutter application. app generates a key pair during login and sends the public key to server (so a new key pair is generated for…
AndyDing
  • 1
  • 1
0
votes
1 answer

Obtain hex string from the ECPrivateKey and ECPublicKey objects

I'm trying to use pointy castle to generate a public and private keypair using the secp256k1 curve. I think i have successfully created an AsymmetricKeyPair composed of an ECPrivateKey and ECPublicKey but i can't obtain their corresponding hex…
MadTyrael
  • 125
  • 2
  • 13
0
votes
1 answer

PKCS1 encryption in Flutter won't work without reflection

I'm writing some code to encrypt data from a flutter client and send it to our servers. We are using PKCS1 padded RSA but i get the error below when attempting to encrypt the data. I/flutter (12394): Bad state: Reflectable has not been…
Duncan Hoggan
  • 5,082
  • 3
  • 23
  • 29
-1
votes
0 answers

Get fingerprint of certificate with pointycastle

I'm using pointycastle to generate a new RSA-Key for asymmetric encryption of data. To identify the key I want the fingerprint/hash of that key. How do I get it? Here is my code to generate the RSA key (feel free to give me feedback when I do…
rekire
  • 47,260
  • 30
  • 167
  • 264
-1
votes
0 answers

How to use sha256 with rsa oaep in flutter

This is from flutter. I wanted to add sha256 hashing with the rsa-oaep, how to do that. In the official doc of pointy castle, they didnt mention anything like that. Any suggestions? final encryptor = OAEPEncoding(RSAEngine()) ..init(true,…
ayato
  • 1
  • 1
-1
votes
1 answer

Flutter how to use AES GCM 256 algorithm to cipher and decrypt using pointycastle package

I have two functions witch cipher and decrypt data with AES-GCM algorithm but using cryptography package. I don't think its bad, it helped me a lot, but I want to translate them so I can use pointycastle package for all my different encryption and…
Antonycx
  • 209
  • 3
  • 14
-3
votes
1 answer

string encryption with Keccak256 in app Flutter

we are making an app to make transactions in the polygon BlockChain. We need to encrypt a String with Kecca256 encryption, which is what Poligon receives. Could someone help me how to encrypt a String with that Protocol
1
2