Query STM32 parts for security features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The SQLite database file is in STMCube installation, cube-finder-db.db | |
select * from ( | |
select substr(rpn,1,length(rpn)-2) as rpn, --remove last 2 letters of RPN which are memory size | |
core, featurename, featureitemname | |
from ( | |
select replace(replace(rpn,'-A',''),'-X','') as rpn, --squash minor variants | |
strValue as core, f.name featurename, fi.item featureitemname | |
from cpn | |
join cpn_has_attribute cha on cha.cpn_id=cpn.id | |
join attribute catt on catt.id=cha.attribute_id | |
join rpn_has_cpn rhc on rhc.cpn_id=cpn.id | |
join rpn on rpn.id=rhc.rpn_id | |
join rpn_has_featurelist rhf on rhf.rpn_id=rpn.id | |
join feature f on rhf.feature_id=f.id | |
join featureitem fi on rhf .featureItem_id=fi.id | |
where catt.name='core' | |
and cha.strValue in ('Arm Cortex-M0', 'Arm Cortex-M0+', 'Arm Cortex-M3','Arm Cortex-M3+','Arm Cortex-M4','Arm Cortex-M4+','Arm Cortex-M7','Arm Cortex-M7+') | |
and ( upper(fi.item) like '%PUBLIC%' or upper(fi.item) like '%PRIVATE%' | |
or upper(fi.item) like '%PKA%' or upper(fi.item) like '%AES%' | |
or upper(fi.item) like '%HASH%' or upper(fi.item) like '%CRYPT%' | |
or upper(fi.item) like '%SHA%' | |
-- or upper(fi.item) like '%ECC%' -- this returns ecc memory, rather than elliptic curve | |
--or upper(fi.item) like '%CRC%' -- most parts have this | |
) | |
and (not f.name like '%DMA controller%') and (not fi.item like '%DMA controller%') | |
and (not fi.item like '%HW semaphores for resources sharing%') | |
order by rpn | |
) | |
) | |
group by core, rpn, featurename, featureitemname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment