encryption-symmetric

HTTPS uses Asymmetric or Symmetric encryption?

你说的曾经没有我的故事 提交于 2020-08-04 05:10:48
问题 I have searched all this morning but I've found websites where it is said that data is sent through an asymmetric encryption using the TLS protocol Then I found the contrary Please can you tell me which is true? Thanks And does anyone know a guide where it is explained step by step the handshake of tls protocol over https? 回答1: The best answer is that it does both. TLS uses asymmetric encryption to first establish identity of one or both parties. Secondly, it uses asymmetric encryption to

Hybrid cryptography. Length of the data to decrypt is invalid

自作多情 提交于 2020-02-08 10:22:48
问题 I am getting above mentioned error during a hybrid cryptography implementation. as per https://en.wikipedia.org/wiki/Hybrid_cryptosystem I am just stucked at the last step My code is private void button1_Click(object sender, EventArgs e) { try { CspParameters cspParams = new CspParameters { ProviderType = 1 }; RSACryptoServiceProvider rsaProvider = new RSACryptoServiceProvider(2048, cspParams); string publicKey =lblPublicKey.Text = Convert.ToBase64String(rsaProvider.ExportCspBlob(false));

SigningCredentials on .NET Core 1.0

我与影子孤独终老i 提交于 2020-02-07 05:30:07
问题 SigningCredentials on .NET Core is different from .NET 4.0 回答1: The equivalent code in .NET Core would be: var key = Encoding.UTF8.GetBytes(accessKey); var signingKey = new SymmetricSecurityKey(key); var signingCredentials = new SigningCredentials(signingKey, SecurityAlgorithms.HmacSha256); The class names have changed a little, but everything should work the same. Make sure you are using the latest package versions. 来源: https://stackoverflow.com/questions/38089523/signingcredentials-on-net

AES and its cipher modes

不问归期 提交于 2020-01-16 03:41:29
问题 I was trying encryption/decryption with AES then I tried the CBC & ECB modes I got the same encrypted output from all three ! is this how it goes? it's may not be wrong but I just don't know what to expect . and what's the point of having modes if they all produce the same cipher ? is it time or performance complexity ? can you explain the difference between AES and its cipher modes ? what's the default cipher mode ? or if you can give me any references cuz MSDN is not clear enough thank you

RSA and AES encryption

匆匆过客 提交于 2020-01-14 08:14:27
问题 I am looking at the feasibility for using Chrome apps for the front end of some applications I am working on. (As an aside, if anyone has any thoughts on this - put it in the comments) I would be using chrome.socket and would want the connections to be secure so will need RSA and AES encryption that will be compatible with as many backend technology implementations as possible (C#, Java, ...). What I mean by this is the different modes, key-lengths, implementation-specific details... Now I

Stopping decryption before EOF throws exception: Padding is invalid and cannot be removed

血红的双手。 提交于 2020-01-12 07:27:10
问题 This is the scenario we have: We have huge encrypted files, in the order of gigabytes that we can decrypt correctly if we read them until the end. The problem arises when we are reading and detect some flag in the file, then we stop reading and call reader.Close(), what happens is that a CryptographicException: "Padding is invalid and cannot be removed." is thrown. I have this small console app that reproduce this behavior, to test it just run it, it will create a file in your C:\ drive and

Stopping decryption before EOF throws exception: Padding is invalid and cannot be removed

左心房为你撑大大i 提交于 2020-01-12 07:27:06
问题 This is the scenario we have: We have huge encrypted files, in the order of gigabytes that we can decrypt correctly if we read them until the end. The problem arises when we are reading and detect some flag in the file, then we stop reading and call reader.Close(), what happens is that a CryptographicException: "Padding is invalid and cannot be removed." is thrown. I have this small console app that reproduce this behavior, to test it just run it, it will create a file in your C:\ drive and

Downloading encrypted file from Window Azure storage

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-04 02:39:06
问题 I have created a MVC WebRole Window Azure application where i upload encrypted files to Azure blob storage using SymmetricAlgorithm (Rijndael) like this Controler>Action is [HttpPost] public ActionResult UploadImage_post(HttpPostedFileBase fileBase) { if (fileBase.ContentLength > 0) { // Retrieve a reference to a container Microsoft.WindowsAzure.StorageClient.CloudBlobContainer blobContainer = _myBlobStorageService.GetCloudBlobContainer(); Microsoft.WindowsAzure.StorageClient.CloudBlob blob =

AES-256 encryption in PHP

一笑奈何 提交于 2019-12-28 03:42:05
问题 I need a PHP function, AES256_encode($dataToEcrypt) to encrypt the $data into AES-256 and another one AES256_decode($encryptedData) do the opposite. Does anyone know what code should this functions have? 回答1: Look at the mcrypt module AES-Rijndael example taken from here $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM); $key = pack('H*', "bcb04b7e103a0cd8b54763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3"); # show key size

How to add our created session encryption algorithm to (major) browser using OpenSSL

情到浓时终转凉″ 提交于 2019-12-25 15:17:59
问题 I am new to OpenSSL and have theoretical information in SSL protocol . I have task to create a certificate who uses RSA algorithm for symmetric session key exchange and use my own my encryption algorithm called FooSymmetricAlgorithm for symmetric session key. I need a way to tell the browser and web server to use FooSymmetricAlgorithm as symmetric algorithm. I know I can import my root certificate to browser but I think that does not mean I can add my encryption algorithm to browser. My