Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Aug 18, 2020
1 parent 5104822 commit e6d2d2b
Showing 1 changed file with 19 additions and 31 deletions.
50 changes: 19 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
PCLCrypto
=========
# PCLCrypto

PCLCrypto provides cryptographic APIs over algorithms implemented by the platform, including exposing them to portable libraries.
PCLCrypto does not implement any crypto directly, thus making this library a good choice for applications that require the assurance of high quality crypto implementations that can most reliably be found within the operating system itself or hardware.
Expand All @@ -8,30 +7,31 @@ PCLCrypto does not implement any crypto directly, thus making this library a goo
[![NuGet package](https://buildstats.info/nuget/PCLCrypto?includePreReleases=true)](https://nuget.org/packages/PCLCrypto)
[![Join the chat at https://gitter.im/AArnott/PCLCrypto](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/AArnott/PCLCrypto?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

### Features
## Features

* Cryptographically strong random number generator
* Symmetric and asymmetric encryption and signatures
* Key derivation
* Native crypto performance for each platform. This provides a 2-100X perf improvement for RSA on Android and iOS.
* Streaming encryption on WinRT, which goes beyond what the WinRT API itself offers (while still relying on the OS for the crypto implementation).
* Support for multiple key formats (PKCS#1, PKCS#8, CAPI) on all platforms.
* Cryptographically strong random number generator
* Symmetric and asymmetric encryption and signatures
* Key derivation
* Native crypto performance for each platform. This provides a 2-100X perf improvement for RSA on Android and iOS.
* Streaming encryption on UAP, which goes beyond what the WinRT API itself offers (while still relying on the OS for the crypto implementation).
* Support for multiple key formats (PKCS#1, PKCS#8, CAPI) on all platforms.

The API is designed to be similar to that found on WinRT or the .NET Framework. However some code changes may be required if migrating to this library from platform-specific crypto.

### Installation

Add a dependency to this library into your project via the pre-built NuGet package: [PCLCrypto][4].
Add a dependency to this library into your project via the `PCLCrypto` NuGet package:

Install-Package PclCrypto
[![NuGet package](https://buildstats.info/nuget/PCLCrypto?includePreReleases=true)](https://nuget.org/packages/PCLCrypto)

Be sure to install the NuGet package into your Portable library as well as each platform-specific app that uses your portable library. If you're shipping your portable library on NuGet, be sure to specify PclCrypto as a NuGet package dependency of your own NuGet package and you're set.
When using `packages.config`, you must be sure to install this package into each app project as well as any libraries in order to consume the right PCLCrypto.dll runtime library for the target platform.
If you use `PackageReference` (preferred), this happens automatically.

Installing via NuGet is important because we use facade assemblies and platform-specific assemblies to allow your PCLs to access crypto that is normally available only to platform-specific libraries using a technique Paul Betts calls [Bait and switch PCLs][5]. NuGet handles all the magic for you.
Installing via NuGet is important because we use facade assemblies and platform-specific assemblies to allow your portable libraries to access crypto that is normally available only to platform-specific libraries using a technique Paul Betts calls [Bait and switch PCLs][BaitAndSwitch]. NuGet handles all the magic for you.

### Documentation

Online documentation is available on our [project wiki site][6].
Online documentation is available on our [project wiki site][Wiki].

### Donations

Expand All @@ -42,17 +42,11 @@ or donating bitcoins to `1NC4k82nNev5Cz7ESBfaohbGsC6TKyjKvX` or any other mechan

1. Can I trust the crypto implemented in this library?

This library does not implement crypto. It merely provides PCL-compatible APIs to invoke crypto, and at runtime the crypto offered by the platform is invoked. So you should be able to trust the crypto available through this library almost as much as you can trust the crypto in the operating system you're already running on.

2. How does this differ from the cryptography offered to PCLs in the [PCLContrib][1] project?

* PCLCrypto is focused on just delivering cryptography, with a good level of unit testing that runs on all supported platforms.
* PCLCrypto follows the NuGet consumption patterns of [PCLStorage][3], which makes it very easy to consume from both PCLs and your platform-specific apps.
* PCLCrypto is under active development. PCLContrib [hasn't been updated in a while][2].
This library does not implement crypto. It merely provides .NET Standard-compatible APIs to invoke crypto, and at runtime the crypto offered by the platform is invoked. So you should be able to trust the crypto available through this library almost as much as you can trust the crypto in the operating system your application is already running on.

### C# 6 Tip

One of the new features of C# 6 is [using static][9], which bring static members of static classes into scope. You can take advantage of this feature with PCLCrypto to simplify your code:
One of the new features of C# 6 is [using static][StaticUsing], which bring static members of static classes into scope. You can take advantage of this feature with PCLCrypto to simplify your code:

Before:

Expand Down Expand Up @@ -93,13 +87,7 @@ class TwitterClient
}
```

[1]: https://pclcontrib.codeplex.com/
[2]: https://pclcontrib.codeplex.com/SourceControl/list/changesets
[3]: https://pclstorage.codeplex.com/
[4]: http://nuget.org/packages/pclcrypto
[5]: http://log.paulbetts.org/the-bait-and-switch-pcl-trick/
[6]: https://github.com/aarnott/pclcrypto/wiki
[7]: http://github.com/aarnott/pclcrypto
[8]: https://github.com/sponsors/AArnott
[9]: http://intellitect.com/static-using-statement-in-c-6-0/
[BaitAndSwitch]: http://log.paulbetts.org/the-bait-and-switch-pcl-trick/
[Wiki]: https://github.com/aarnott/pclcrypto/wiki
[StaticUsing]: http://intellitect.com/static-using-statement-in-c-6-0/
[Keybase]: https://keybase.io/aarnott

0 comments on commit e6d2d2b

Please sign in to comment.