-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOC certificate questions (CON-416) #325
Comments
|
Is this sequence accurate? Can you help fill in exact commands?
Use RootCA and IntermediateCA to start controller. |
I think you are not so clear about the NOC chain generation. There is a example for an NOC Chain generation.
To ensure the security, the RCAC private key and ICAC private key are saved in cloud and will never be sent to the controller or end devices. Each device will have a NOC with the NOC private key, also the NOC private key will never leave the device. So the NOC generation should be in cloud. The cert chain: RCAC(self-signed) ->ICAC(signed by RCAC private key) ->NOC(signed by ICAC private key) Also the ICAC is optional for NOC chain, so if there is no ICAC, the NOC is signed by the RCAC private key. And in this situation, the cloud will save only the RCAC and its priv-key with the RCACId, fabricId and CATs. |
|
ICAC's key pair can be generated and store on the controller and the cert generation should be in cloud, because ICAC is signed by the RCAC private key and the private key should never leave the cloud.
Yes, because the test controller will store the RCAC&private-key, but it cannot control the devices once it is factory-reset, so it is only for test. Storing the RCAC&key in the cloud can make the controller be able to control the devices even if it is factory-reset because it can re-obtain the ICAC&NOC signed by the original RCAC again. You can backup the RCAC&key generated by the controller in the cloud, but it is not so safe because the RCAC private key might be leaked during the backup.
Yes, they can. |
@jonsmirl Please close this issue if your questions are answered |
Hello,@jonsmirl ,Does the private keys of ICAC and RCAC must be stored in the cloud? Can ICAC be stored in an APP or matter controller(like hub)? It semms like the RCAC and ICAC certificate perpetually valid unless recreate the house. How to handle if the private key leaked? It seems like there is no RCAC certificate revocation mechanism in matter. |
If you store the ICAC in the phone app you can commission devices without needing to access the cloud. This is a way to support multiple users. For each user a different ICAC is generated which they store locally in their phone. If the RCAC private key is leaked, you are doomed and have the reset all of the devices. There is no way to revoke it. That makes sense, because if you revoked the RCAC then you'd still have to reset all of the devices to get the old RCAC out of them. You could also remove all of the entries for the old fabric and then make a new one using a new RCAC. If the ICAC private key is leaked, you don't revoke it. Instead you create new ICAC for everyone still trusted with a different CAT tag. Now upgrade all of the device's ACL to use the new CAT tag. This will render the leaked ICAC useless since they won't be able to generate a new ICAC with the new CAT tag in it. You can leave both CATs in the devices durring a window while you are upgrading the controllers. This is how you get rid of a user you gave an ICAC to. Also note, giving another user an ICAC lets them commission new devices, alter ACLs, etc. You don't have to give other users an ICAC instead you can just give them normal certificates. With a normal certificate they can still do anything allowed by the ACL, they just aren't admins. This is a solution to something like guests in an AirBnB. But why bother? Instead use Google/Apple/Amazon to handle the guests. There is no solution for losing an RCAC or ICAC private key which does not involve touching all of the devices. CRL (certificate revocation lists) only work because when you verify a certificate you get the CRL from the cloud and Matter devices don't access the cloud on their own. CRLs don't really gain you anything that you can't get from ACLs and changing the CAT tag. If you revoked the RCAC the whole fabric would stop working which is equivalent to remove it or reseting the device. One thing for sure not to do -- don't store the RCAC in a phone. Because if the person deletes and reinstalls the app, they will lose the RCAC. And people delete apps all of the time when their phones run out of space. |
Thank you. You're right, if the ICAC private key is stored in the mobile app, you can commission devices without needing to access the cloud. However, if the private key is stored in the app, and I lose my phone, anyone who knows my Wi-Fi password could potentially control my devices. In that case, I would have to reset all the devices, which seems quite troublesome when there are a lot of devices involved. |
When you make keypair on a phone using the OS API the private key is stored in the ARM trust zone which is inaccessible. Also, if you lose your phone your phone will have the normal IOS/Android locks on it which are quite difficult to defeat. In general only law enforcement can gain access to a lost phone. Note that if you don't store an ICAC in the phone you have to store a normal certificate which can still access all of the devices, it just can't make new ones. I see little downside to storing an ICAC in the phone. If you are really worried when you lose the phone you can use the process of changing the CAT tag to render the phone useless. |
Got it. Thanks very much. |
Should the chain look like this?
RootCA -- company owned (cloud)
IAC -- One per house (cloud)
IAC -- One per controller (stored in controller, shares CASE Authenticated Tag)
NOC - final certificates in the nodes
or like this?
RootCA -- One per house (cloud)
IAC -- One per controller (stored in controller, shares CASE Authenticated Tag)
NOC - final certificates in the nodes
or is the root of this chain a CSA issued certificate?
This model allows people to delete the controller app off from their phones, and then when they reinstall it a new IAC will be generated from the cloud-base house IAC.
Matter NOC certificates need MatterRCACId, MatterFabricId, MatterICACId values encoded into the Issuer and Subject fields. Where do these IDs come from?
So when instantiating a controller it needs parameters:
setRootCertificate(ByteArray) -- how do you it build this ByteArray from a CRT file?
setIntermediateCertificate(ByteArray)
setFabricId(id) - this ID is also in the certificate, where does it come from?
setIpk() -- it needs this, what is it, and how do I set it?
What do you do with a CASE Authenticated Tag? I think it is for doing this, am I right? I want to have multiple controllers on the same fabric. When a node is commissioned, the nodeId of the commissioner gets written into the ACL. So now if I add a second commissioner, how do I get its nodeID into all of the nodes? I think the answer to this is to use a CASE Authenticated Tag. The first commissioner would update the nodes ACL entry to use the CASE Authenticated Tag instead of a normal nodeID. Then both commissioners would have the same CASE Authenticated Tag. How do you use this feature since the CASE Authenticated Tag has to be inside the NOC certificate? Page 327 of the spec.
The text was updated successfully, but these errors were encountered: