Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 29 12:48
    1Cor125 commented #152
  • Apr 28 23:26
    AArnott commented #152
  • Apr 28 15:09
    1Cor125 commented #152
  • Apr 05 05:38

    dependabot[bot] on nuget

    (compare)

  • Apr 05 05:38
    dependabot[bot] closed #185
  • Apr 05 05:38
    dependabot[bot] commented #185
  • Apr 05 05:38
    dependabot[bot] labeled #189
  • Apr 05 05:38
    dependabot[bot] opened #189
  • Apr 05 05:38

    dependabot[bot] on nuget

    Bump Microsoft.NET.Test.Sdk fro… (compare)

  • Mar 31 10:54
    nbevans opened #188
  • Mar 15 05:38

    dependabot[bot] on nuget

    (compare)

  • Mar 15 05:38
    dependabot[bot] closed #186
  • Mar 15 05:38
    dependabot[bot] commented #186
  • Mar 15 05:38
    dependabot[bot] labeled #187
  • Mar 15 05:38
    dependabot[bot] opened #187
  • Mar 15 05:38

    dependabot[bot] on nuget

    Bump Microsoft.VisualStudio.Thr… (compare)

  • Mar 08 05:37
    dependabot[bot] labeled #186
  • Mar 08 05:37
    dependabot[bot] opened #186
  • Mar 08 05:37

    dependabot[bot] on nuget

    Bump Microsoft.VisualStudio.Thr… (compare)

  • Mar 01 05:46
    dependabot[bot] labeled #185
Peter Taylor
@emersont1
Hello
Andrew Arnott
@AArnott
Greetings
Peter Taylor
@emersont1
I was looking at using your PCL crypto, but would like to know of the hashing functions use byte arrays or strings as byte arrays seem to break the application
Andrew Arnott
@AArnott
I don't understand the question. I believe all the crypto/hash methods take byte[]. If you have strings, you have to convert them to byte[] yourself first.
Nguyễn Đăng Minh Lực
@minhlucnd
WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha1); => Exception thrown: 'System.NotImplementedException' in PCLCrypto.dll . My profile lib targeting '.NETPortable,Version=v4.5,Profile=Profile259'
Francis Rath
@francisrath
Hello guys, I am back looking at the problem that I have in #30
I can't seem to find where this goes wrong. I am thinking it may be in my code around the encryption, but no hard evidence either way yet. It works just fine for most files, but some seem to be encrypted incorrectly in my server (ASP.NET)
When I take one file that I know throws an exception when decrypting and re-encrypt the original file I the results are not the same as when my server encrypts it. Up to 0x1990 bytes of output they are exactly the same, and after that it is 99.99% different (I guess only some random bytes that end up being the same). Any ideas what this might be? is 0x1990 a multiple of some relevant number? My block size is 16, so I guess it would be 409 blocks that encrypt correctly
William Raiford
@bill-mybiz
@francisrath I'm no PCLCrypto expert (just a random guy who saw your problem), but if that is the case, then it sounds like it could be the block chaining having a problem at that point. This would agree with why it's mostly different after a point. Perhaps it is unable to read the character in that byte in a string-to-byte conversion? To further troubleshoot, I might try replacing the source byte in question to a "known" character (i.e. one that is earlier in the source and that is encrypting properly) and see if it still messes up at that particular point. I know I've had problems with various byte-string conversions in the past.
Andrew Arnott
@AArnott
@minhlucnd It sounds like you haven't installed the PclCrypto package into your platform-specific project. The PCL assembly itself does not (indeed, cannot) call a platform-specific API. So your PCL should install PclCrypto, as you've done. But then your app project (or test project) which targets a particular platform must also install the package. See http://log.paulbetts.org/the-bait-and-switch-pcl-trick/
@bill-mybiz I appreciate you chiming in. In this case, @francisrath isn't dealing in characters at all, but byte[] so character encodings shouldn't be a problem.
@francisrath How long is the ciphertext after 0x1990? If it's one block length, then it's padding, and padding is intentionally randomized. I suspect if your encrypt the same data twice, both times on your ASP.NET server, that you'd get different ciphertext for the last block each time.
Andrew Arnott
@AArnott
Does the failure happen if you try to decrypt it on other platforms besides WinRT? Can 'desktop CLR' decrypt it (either via PclCrypto or directly using .NET 4.5 crypto APIs)?
Andrew Arnott
@AArnott
Help wanted:
  • A public documentation page that describes which algorithms and options are supported on each platform.
  • An CI build that runs tests on all platforms
  • Supporting more algorithms on each platform.
Francis Rath
@francisrath
Hey @AArnott, sorry about the long delay. I am more and more convinced that this is not a bug with PCLCrypto, but actually corrupted downloads. I have added MD5 testing to verify the downloads (using WinRT BackgroundDownloader to download files from Azure Blob Storage) and I have found that several downloads have been corrupted. Will get back to you if the problem continues! Thanks for your comments!
Attila Hajdrik
@attilah
Hi
Andrew Arnott
@AArnott
Thanks, @francisrath
Hi @attilah
Edgard David Iván Muñoz Chávez
@okhosting
About to use your library @AArnott, it looks pretty great with all those targets supported, thanks for this!
Andrew Arnott
@AArnott
yw @okhosting :)
Ric
@ThoughtPT
Hi, i would like to know if there is a example to create a PKCS5 key with a provided password, salt and 40 iterations, thanks
Ric
@ThoughtPT
ah ok :) must have missed it
Tim Uy
@tofutim
@AArnott, just wanted to tell you that you are my PCL hero
I'm thinking about making a PCLSqlite
Andrew Arnott
@AArnott
Thanks, @tofutim.
There is already a few SQLite PCLs on NuGet. The one I like best is sqlite-net-pcl
Tim Uy
@tofutim
I'll check it out
Andrew Arnott
@AArnott
Woot! I finally have all [enabled] tests passing at once on all devices in the master branch. You'd think this should of course be the way it is, and you'd be right. I had it working several months ago when I last did a lot of feature work on this library, but Xamarin and Windows Store/Phone development tends to decay over time, and it's taken more than a week to get things running smoothly again.
Andrew Arnott
@AArnott
Now if I can just get all the projects to build on AppVeyor...
Andrew Arnott
@AArnott
Cool: https://github.com/xamarin/KinderChat uses PCLCrypt internally. :)
Andrew Arnott
@AArnott
oh so close... to publishing the stable 2.0 package. :)
Andrew Arnott
@AArnott
The v2.0 release build is underway
Edgard David Iván Muñoz Chávez
@okhosting
Cool @AArnott thanks a lot
Andrew Arnott
@AArnott
v2.0.144 just pushed to nuget, which fixes use in dnxcore, dotnet, and UWP projects
Kyle Spearrin
@kspearrin
Hey @AArnott . Trying to use PCLCrypto for RSA Decrypt with OAEP padding and am getting issues with iOS. WinRTCrypto.CryptographicEngine.Decrypt(key, data); causes iOS error "status was Param". Android works just fine.
For same data/key.
I've been dissecting the iOS RsaCryptographicKey implementation a bit and the problem seems to be coming from a non-success SecStatusCode from the SecKeyDecrypt pinvoke here https://github.com/AArnott/PCLCrypto/blob/ef864c731f4ce667f7f5c03680800e51b606f823/src/PCLCrypto.Shared.iOS/RsaCryptographicKey.cs#L265
Just curious if you had any insight as to what's going on while I try to figure this out
"Param" seems to mean there is something wrong with the parameters to SecKeyDecrypt according to https://developer.apple.com/reference/security/errsecparam
Not very informative though
Kyle Spearrin
@kspearrin
I am starting to think that SecKeyDecrypt doesn't support OAEP SHA256 - http://stackoverflow.com/questions/28724696/ios-seckeyencrypt-oaep-sha512
Only SHA1
Andrew Arnott
@AArnott
Thanks for reporting what you found, @kspearrin. As PCLCrypto doesn't actually implement encryption, it is limited to those algorithms actually implemented by the platform it's running on.
Kyle Spearrin
@kspearrin
Yea no worries. It just took me forever to figure that out, so it might be best to document such things.
I opened an issue for it: AArnott/PCLCrypto#124