encryption

Searching encrypted field in Postgres

女生的网名这么多〃 提交于 2021-01-27 09:38:09
问题 I'm attempting to query an encrypted field in postgres using "pgp_sym_encrypt". I'm running my test by setting all the first names in my table to an encrypted value: update person set first_name = pgp_sym_encrypt('test', 'password'); Then selecting on it: select * from person where first_name = pgp_sym_encrypt('test', 'password'); This returns no results. If I change it to use the normal postgres encryption it will return all the rows in the table: update person set first_name = encrypt('test

Searching encrypted field in Postgres

为君一笑 提交于 2021-01-27 09:37:30
问题 I'm attempting to query an encrypted field in postgres using "pgp_sym_encrypt". I'm running my test by setting all the first names in my table to an encrypted value: update person set first_name = pgp_sym_encrypt('test', 'password'); Then selecting on it: select * from person where first_name = pgp_sym_encrypt('test', 'password'); This returns no results. If I change it to use the normal postgres encryption it will return all the rows in the table: update person set first_name = encrypt('test

windows encrypted rdp passwords in golang

筅森魡賤 提交于 2021-01-27 06:43:21
问题 like http://play.golang.org/p/fD7mx2k4Yc window rdp password encrypted http://www.remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/ package main import ( "fmt" "log" "syscall" "unsafe" ) const ( CRYPTPROTECT_UI_FORBIDDEN = 0x1 ) var ( dllcrypt32 = syscall.NewLazyDLL("Crypt32.dll") dllkernel32 = syscall.NewLazyDLL("Kernel32.dll") procEncryptData = dllcrypt32.NewProc("CryptProtectData") procDecryptData = dllcrypt32.NewProc("CryptUnprotectData") procLocalFree = dllkernel32.NewProc

windows encrypted rdp passwords in golang

谁都会走 提交于 2021-01-27 06:42:25
问题 like http://play.golang.org/p/fD7mx2k4Yc window rdp password encrypted http://www.remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/ package main import ( "fmt" "log" "syscall" "unsafe" ) const ( CRYPTPROTECT_UI_FORBIDDEN = 0x1 ) var ( dllcrypt32 = syscall.NewLazyDLL("Crypt32.dll") dllkernel32 = syscall.NewLazyDLL("Kernel32.dll") procEncryptData = dllcrypt32.NewProc("CryptProtectData") procDecryptData = dllcrypt32.NewProc("CryptUnprotectData") procLocalFree = dllkernel32.NewProc

Android - javax.crypto.AEADBadTagException

半腔热情 提交于 2021-01-27 06:27:16
问题 I'm currently getting an AEADBadTagException when trying to decrypt a file I have encrypted. I have searched pretty much everywhere on stackoverflow and unable to find a solution, and hoping there is just a small mistake I have made or something to do with encoding etc., since GCM is unable to verify the tag that it is generating. I believe the problem is somewhere in the file I am trying to encrypt/decrypt. The same exact code works on an image, however, when I try to encrypt a PDF, it fails

Encrypting Headers S/MIME message/rfc822

╄→гoц情女王★ 提交于 2021-01-27 06:09:52
问题 I am looking to encrypt certain mail headers ( Subject and Reply-To ) which are being sent in an encrypted mail. I am taking an entire MIME (Headers included) and successfully encrypting it. I can send this S/MIME encrypted mail to my mail client (Thunderbird) successfully. It will be successfully decrypted and verified as signed. However, any headers that are sent in the inner encrypted MIME are not being used by my mail client. According to RFC-5751 I should be wrapping my mail in a message

How does RFC2898DeriveBytes generate an AES key?

余生长醉 提交于 2021-01-27 04:42:29
问题 I saw some code like string password = "11111111"; byte[] salt = Encoding.ASCII.GetBytes("22222222"); Rfc2898DeriveBytes key = new Rfc2898DeriveBytes(password, salt); RijndaelAlg.Key = key.GetBytes(RijndaelAlg.KeySize / 8); I can see the key is generated by Rfc2898DeriveBytes with passphrase and salt. Then AES retrieves the key by GetBytes. But the question is, what does RFC2898DeriveBytes do and what key.GetBytes(cb) do? Could anyone elaborate this? I couldn't get it from the documentation.

Difference Between RSA-OAEP and RSA-PKCS1.5 [closed]

风流意气都作罢 提交于 2021-01-27 04:37:51
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Improve this question What is the different between RSA-OAEP and RSA-PKCS1.5? My understanding is they are both RSA encryption, but using different padding schemes. What is the advantage of one over the other? If I generate a RSA 2048 pirate and public key pair, can I use the same

Difference Between RSA-OAEP and RSA-PKCS1.5 [closed]

痞子三分冷 提交于 2021-01-27 04:37:10
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Improve this question What is the different between RSA-OAEP and RSA-PKCS1.5? My understanding is they are both RSA encryption, but using different padding schemes. What is the advantage of one over the other? If I generate a RSA 2048 pirate and public key pair, can I use the same

Laravel 5.8 - save user emails encrypted

China☆狼群 提交于 2021-01-24 11:41:46
问题 I'm looking for a way to encrypt the user emails in the database. Since Encrypt always generates a different string, it fails. So I took sha1. in AuthenticatesUsers I've changed the credentials method to: protected function credentials(Request $request) { return ['email' => sha1(strtolower($request->email)), 'password' => ($request->password)]; } This works great for the login/registration. But there are problems with resetting the password. Resetting the password uses the