Welcome Guest, Not a member yet? Register   Sign In
How encrypt with vector
#1

Hi
I use encryption library with AES cipher
I need encrypt my data with vector but this library dont have any field or method about vector
Please help me
Reply
#2

What library are you using? OpenSSL can use a vector IV.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(01-29-2020, 03:29 AM)InsiteFX Wrote: What library are you using? OpenSSL can use a vector IV.
Encryption library
I use openSSL but this library dont have any properties or method for vector
Reply
#4

OpenSSL creates the IV vector like this:

iv = initialization vector

PHP Code:
$iv openssl_random_pseudo_bytes(openssl_cipher_iv_length('AES-256-CBC')); 

openssl_cipher_iv_length
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(01-29-2020, 09:08 AM)InsiteFX Wrote: OpenSSL creates the IV vector like this:

iv = initialization vector

PHP Code:
$iv openssl_random_pseudo_bytes(openssl_cipher_iv_length('AES-256-CBC')); 

openssl_cipher_iv_length
I know it but how do i use it in codeigniter encryption library?
Reply
#6

Make sure that you are using the library version it has OpenSSL driver.

From viewing the library they are doing the vector using the key.

PHP Code:
$key openssl_random_pseudo_bytes($length$is_secure); 

As you can see above.

The vector is from what I read just the length of the key.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

(01-30-2020, 05:31 AM)InsiteFX Wrote: Make sure that you are using the library version it has OpenSSL driver.

From viewing the library they are doing the vector using the key.

PHP Code:
$key openssl_random_pseudo_bytes($length$is_secure); 

As you can see above.

The vector is from what I read just the length of the key.

Doesn't the vector contain a series of characters?
Do you can give me sample for use vector?
Thanks
Reply
#8

This is how it works from php.net

openssl_encrypt
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#9

(01-30-2020, 01:03 PM)InsiteFX Wrote: This is how it works from php.net

openssl_encrypt
Thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB