High performance encryption in adobe air / flash

When searching for classes / functions related to encryption in a script / air / flash action, I saw as3crypto .

This option provides an excellent set of options, but I'm a little worried about what numbers represent when they are used to decrypt the local media file when it is selected for playback.

I am looking for security and a balance of performance .

For video / music, it should be decoded at a fast enough rate so that the player plays smoothly - this is what depends on the format , but in all cases there is less delay in waiting for the entire file to be decoded.

The hardest part is the need to use it for flash applications , as afaik he needs to wait until all this does nothing . If this assumption is incorrect, it is here that the best performance algorithm in the list on the as3crypto page seems too slow , i.e. 1.5 Mb x sec, to decrypt 30 MB, a flash application will take 20 seconds .

Key questions I have the following:

  • Are there any other libraries with higher performance? Maybe something in the damn air?
  • For videos / songs , that would be a good amount of MB x sec for playback. ?
  • Does the flash wait for the flash application to fully load before starting any of this?
+3
source share
4 answers

I am wondering what kind of encryption you are using. Symmetric or asymmetric crypto? In case of asymmetry, try switching to symmetrical.

In case of symmetry, use a stream cipher (RC4 or any other flavor, just Google for names), as the name suggests that you can encrypt / decrypt in the streams to suit your needs. As far as I remember, RC4 gives the best performance of most stream ciphers (still used in WEP and WPA1)

- - ECB (Electronic Code Book). / , 64/128/192/256 /. , ECB , CBC (Chained Block Cipher), / .

Btw, , , , .

+1

XTEA - , ; ( ).

AS3crypto XTEA, .

+1

, , .. , , . , .

AES-256, CTR (. ). , CTR - AES - , ( CBC, ).

, RC4 , . 256- .

, :

Nonce/IV

, nonce (a.k.a IV " " ) :

  • Nonce/IV - , ( ).
  • nonce/IV
  • API- CTR IV/nonce,
  • RC4:
    • nonce/IV
    • HMAC-SHA256 nonce,

, PBKDF2 ( , . ).

hmac-sha256 , PBKDF2-HMAC-SHA256 , SO .

+1

SSL, Flash, , .

0

Source: https://habr.com/ru/post/1724348/


All Articles