how to encrypt and decrypt messages with more than one sender and more than one receiver?

I am creating a chat app. This app contains private messages and channels. These channels include more than one user.

I want to encrypt messages using AES and to transfer the AES key to users of this channel.

I need a secure transport channel so I used diffie hellman. The problem now is how will I get users to generate the same diffie hellman keys so that I can create a shared key which will be the AES encryption key? I have learned the encryption, but between a sender and a receiver only, but here I have more than one sender and more than one receiver.

I had an idea, to make for all users who share the same channel, the same public and private key. Any user who opens the channel takes the public key from the channel and with his own keys he generates the shared key which forms the AES key. user can encrypts and decrypts any message, no matter who sent it, because all users of this channel have the same keys.

Any other ideas?

Note: I am required to use AES encryption but not deffie hellman, so is there another algorithm better than deffie hellman to do this?

Is it possible to decrypt TLS traffic through OpenSSL?

I have a web server that uses the ECDHE-RSA-AES256-GCM-SHA384 cipher suite. I noticed that when given the "(Pre)-master-secret log" file (generated by the browser), Wireshark is able to decrypt the traffic given the client random and master secret.

I was wondering how that is possible exactly? Or assuming that I have an encrypted HTTP response from the server, how would one decrypt the traffic given this information through the openssl CLI command? I’m using the LibreSSL version of openssl, which supports encryption/decryption using aes-256-gcm.

Example contents of the "Pre-master-secret" log file (generated by the browser):

CLIENT_RANDOM 8a16c5c231d0074f7d1652e66479d8ef90f3e4692c0ea12da51e342d8040c388 b5d95d11fca16b71cdf2a2999e445caff3b379795d18739b79cbae98edbe883e7a28a9ea13aac8902a143f43ab37cf0d 

Decrypt in chunks a ASE 128 CBC encrypted object

I have an Encrypted object in Minio, encrypted using the ASE 128 bit CBC algorithm.

The object is quite large (~50 MB) so instead of loading it into the memory completely (which may cause out of memory exception), I am retrieving it in chunks of 1MB. I need to decrypt it before use.

Is it possible to decrypt the object in this way (1MB at a time, the whole object was encrypted in one go)? If yes, how can I do it? I have tried decrypting 16-byte chunks which produce the following errors:

javax.crypto.BadPaddingException: Given final block not properly padded

javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher

security of AES where attacker can ask secure code to decrypt arbitrary cypher-text

A service or library provides a function decrypt( user_id, cypher_text) and gives back plain text. Internally to the function it loads an AES key from a secure vault, decrypts the cypher_text, and returns the plain text. If an attacker gets access to this function alone, but doesn’t know any valid cyphertext, can they perform an attack to recover the AES key for a particular user_id?

To be clear when I say “the attacker doesn’t know any valid cyphertext” I mean it not only doesn’t have access to a matching encryption function but also that the attacker doesn’t have access to any cypher text that has been encrypted with the key. So the attacker can only feed in some specially crafted series of attacking cyphertext and inspect the decryption results to try to deduce the key.

I have looked for the name of such an attack and haven’t been able to find it. In this case the attacker cannot use a “known plaintext” attack as they don’t have access to a function that encrypts with the AES key. I would describe the scenario above as a “crafted cyphertext attack on a decrypt function”. So my question is whether AES is secure against anything but a brute force attack in such a scenario.

Decrypt a text I don’t know how was encrypted

I have already looked around and didn’t find anything so I thought I could ask here. I have these 2 different encrypted texts +j+hnQx9Wl83MWeM92tyZA== and E4NEi092gWbppbpNR0JUAw==
They should both be long numbers, like 19732832, but I don’t know how to decrypt them. Does anyone know how to help me? I would be very glad if anyone could tell me either the encryption method or just the decrypted text. Thanks in advance

If it can help somehow, this is another examples: lJsFziTUF4LtFzww7d2tVw==

Android app is the only party authorized to decrypt

If we have data stored in encrypted format by the android app (encryption key in keystore), is it possible for the app to be the only entity capable of decrypting it to do some calculations? I am talking even the app’s own user can’t access the decrypted data, not even when not using the app UI to access the app like hackers do.?

Exemple : server is sending encrypted data regarding a QR code for a book. The app should decryot the QR and check if it is stored inside its local data and send a response back to the server. I don’t want the QR code to be humanly accessed by the app’s user through the app or any other tool even though their app can.?