If we see the crypto-config folder in basic-network of fabric-sample, we have various certificate materials with various types:
Can anyone explain why there are so too many of these files why are some of these files duplicated(such as ca.example.com-cert.pem have many copies) and there purpose. What are .pem files used for?
What are .crt files used for?
What are .key files used for?
What are ** ...._sk** files used for?
And why the fabcar example manage it only by using 3 files.??
fabcar/creds ├―― 5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8-priv ├―― 5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8-pub └―― PeerAdmin
Thanks for your help
Each Organization requires a unique root certificate (ca-cert), that binds specific components (peers and orderers) to that organization.
Transactions and communications within Fabric are signed by an entity's private key (keystore), and then verified by means of a public key (signcerts).
As different organization also required to communicate or share their ledger so there is need of CA or MSP on organization level. Within each organization we can have multiple peers so we need certification for these peers too. Even peers from different organizations can join each other so signcerts(for authenticating) and TLScerts(for a secure handshake).
To have a look how these are generate i suggest you to Manually generate the artifacts
http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html
and see the different certs in the folders inside as you created them.
These are keys used by fabcar to generate the above mentioned certificates.