diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/annotated.html b/annotated.html new file mode 100644 index 00000000..db3d63cd --- /dev/null +++ b/annotated.html @@ -0,0 +1,82 @@ + + + + + + + +t_cose: Data Structures + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + + + +
 Ct_cose_key
 Ct_cose_parameters
 Ct_cose_sign1_sign_ctx
 Ct_cose_sign1_verify_ctx
+
+
+ + + + diff --git a/bc_s.png b/bc_s.png new file mode 100644 index 00000000..224b29aa Binary files /dev/null and b/bc_s.png differ diff --git a/bdwn.png b/bdwn.png new file mode 100644 index 00000000..940a0b95 Binary files /dev/null and b/bdwn.png differ diff --git a/classes.html b/classes.html new file mode 100644 index 00000000..27bf4fff --- /dev/null +++ b/classes.html @@ -0,0 +1,80 @@ + + + + + + + +t_cose: Data Structure Index + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Data Structure Index
+
+
+
T
+
+
+
T
+
t_cose_key
t_cose_parameters
t_cose_sign1_sign_ctx
t_cose_sign1_verify_ctx
+
+
+ + + + diff --git a/closed.png b/closed.png new file mode 100644 index 00000000..98cc2c90 Binary files /dev/null and b/closed.png differ diff --git a/dir_bfccd401955b95cf8c75461437045ac0.html b/dir_bfccd401955b95cf8c75461437045ac0.html new file mode 100644 index 00000000..be52f517 --- /dev/null +++ b/dir_bfccd401955b95cf8c75461437045ac0.html @@ -0,0 +1,82 @@ + + + + + + + +t_cose: inc Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
inc Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/dir_c790dd4d93afe6413732f56f53ec2af4.html b/dir_c790dd4d93afe6413732f56f53ec2af4.html new file mode 100644 index 00000000..fb3b9560 --- /dev/null +++ b/dir_c790dd4d93afe6413732f56f53ec2af4.html @@ -0,0 +1,94 @@ + + + + + + + +t_cose: inc/t_cose Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
t_cose Directory Reference
+
+
+ + + + + + + + + + + + + + +

+Files

file  q_useful_buf.h [code]
 This is a TF-M coding style version of UsefulBuf. See UsefulBuf for documentation of these functions.
 
file  t_cose_common.h [code]
 This file contains definitions common to all public t_cose interfaces.
 
file  t_cose_sign1_sign.h [code]
 Create a COSE_Sign1 message, such as for EAT or CWT Token.
 
file  t_cose_sign1_verify.h [code]
 Verify a COSE_Sign1 Message.
 
+
+ + + + diff --git a/doc.png b/doc.png new file mode 100644 index 00000000..17edabff Binary files /dev/null and b/doc.png differ diff --git a/doxygen.css b/doxygen.css new file mode 100644 index 00000000..ffbff022 --- /dev/null +++ b/doxygen.css @@ -0,0 +1,1793 @@ +/* The standard CSS for doxygen 1.9.1 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + border-right: 1px solid #A3B4D7; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F8F9FC; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/doxygen.svg b/doxygen.svg new file mode 100644 index 00000000..d42dad52 --- /dev/null +++ b/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynsections.js b/dynsections.js new file mode 100644 index 00000000..3174bd7b --- /dev/null +++ b/dynsections.js @@ -0,0 +1,121 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +t_cose: File List + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 123]
+ + + + + + +
  inc
  t_cose
 q_useful_buf.hThis is a TF-M coding style version of UsefulBuf. See UsefulBuf for documentation of these functions
 t_cose_common.hThis file contains definitions common to all public t_cose interfaces
 t_cose_sign1_sign.hCreate a COSE_Sign1 message, such as for EAT or CWT Token
 t_cose_sign1_verify.hVerify a COSE_Sign1 Message
+
+
+ + + + diff --git a/folderclosed.png b/folderclosed.png new file mode 100644 index 00000000..bb8ab35e Binary files /dev/null and b/folderclosed.png differ diff --git a/folderopen.png b/folderopen.png new file mode 100644 index 00000000..d6c7f676 Binary files /dev/null and b/folderopen.png differ diff --git a/functions.html b/functions.html new file mode 100644 index 00000000..addca985 --- /dev/null +++ b/functions.html @@ -0,0 +1,103 @@ + + + + + + + +t_cose: Data Fields + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
+
+ + + + diff --git a/functions_vars.html b/functions_vars.html new file mode 100644 index 00000000..5a4d8a86 --- /dev/null +++ b/functions_vars.html @@ -0,0 +1,103 @@ + + + + + + + +t_cose: Data Fields - Variables + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/globals.html b/globals.html new file mode 100644 index 00000000..a6b7d7be --- /dev/null +++ b/globals.html @@ -0,0 +1,344 @@ + + + + + + + +t_cose: Globals + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
+ +

- t -

+
+ + + + diff --git a/globals_defs.html b/globals_defs.html new file mode 100644 index 00000000..f1844774 --- /dev/null +++ b/globals_defs.html @@ -0,0 +1,135 @@ + + + + + + + +t_cose: Globals + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/globals_enum.html b/globals_enum.html new file mode 100644 index 00000000..ee3abdf5 --- /dev/null +++ b/globals_enum.html @@ -0,0 +1,78 @@ + + + + + + + +t_cose: Globals + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/globals_eval.html b/globals_eval.html new file mode 100644 index 00000000..ba288ea0 --- /dev/null +++ b/globals_eval.html @@ -0,0 +1,200 @@ + + + + + + + +t_cose: Globals + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+  + +

- t -

+
+ + + + diff --git a/globals_func.html b/globals_func.html new file mode 100644 index 00000000..8256d858 --- /dev/null +++ b/globals_func.html @@ -0,0 +1,147 @@ + + + + + + + +t_cose: Globals + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/index.html b/index.html new file mode 100644 index 00000000..1fd68c45 --- /dev/null +++ b/index.html @@ -0,0 +1,210 @@ + + + + + + + +t_cose: Main Page + + + + + + + + + +
+
+ + + + + + +
+
t_cose +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
t_cose Documentation
+
+
+

t_cose

+

t_cose implements enough of COSE to support CBOR Web Token, RFC 8392
+ and Entity Attestation Token (EAT). This is the COSE_Sign1 part of COSE, RFC 9052.

+

Implemented in C with minimal dependency – There are three main dependencies: 1) QCBOR, 2) A cryptographic library for ECDSA and SHA-2, 3) C99, <stdint.h>, <stddef.h>, <stdbool.h> and <string.h>. It is highly portable to different HW, OS's and cryptographic libraries. Except for some minor configuration for the cryptographic library, no #ifdefs or compiler options need to be set for it to run correctly.

+

Crypto Library Integration Layer – Works with different cryptographic libraries via a simple integration layer. The integration layer is kept small and simple, just enough for the use cases, so that integration is simpler. Integration layers for the OpenSSL and ARM Mbed TLS (PSA Cryptography API) cryptographic libraries are included.

+

Secure coding style – Uses a construct called UsefulBuf / q_useful_buf as a discipline for safe coding and handling of binary data.

+

Small simple memory model – Malloc is not needed. Besides the cryptographic library and payload buffer, about 600 bytes of heap/stack is needed for signing and 1500 bytes for verifying. The caller supplies the output buffer and context structures so the caller has control over memory usage making it useful for embedded implementations that have to run in small fixed memory.

+

+Documentation

+

API documentation is here

+

+Code Status

+

As of March 2022, the code is in good working order and the public interface has been stable for over a year.

+

Integration with the OpenSSL and Arm Mbed TLS cryptographic libraries is fully supported.

+

t_cose 1.0 only supports COSE Sign1, signing with one recipeint.

+

+t_cose 2.0

+

As of August 2022, there are alpha releases of t_cose 2.0. It supports:

    +
  • COSE_Sign
  • +
  • Multiple signatures
  • +
  • COSE_MAC0
  • +
  • COSE_Encrypt and COSE_Encrypt0
  • +
  • Encryption with ECDH per RFC 9053
  • +
+

See the dev branch and the releases.

+

+Building and Dependencies

+

Except for the crypto library set up, t_cose is very portable and should largely just work in any environment. It needs a few standard libraries and QCBOR (which is also very portable). Hence most of this section is about crypto library set up.

+

+QCBOR

+

If QCBOR is installed in /usr/local, then the makefiles should find it. If not then QCBOR may need to be downloaded. The makefiles can be modified to reference it other than in /usr/local.

+

+Supported Cryptographic Libraries

+

Here's three crypto library configurations that are supported. Others can be added with relative ease.

+

+Test Crypto – Makefile.test

+

This configuration should work instantly on any device and is useful to do a large amount of testing with, but can't be put to full commercial use. What it lacks is integration with an ECDSA implementation so it can't produce real ECDSA signatures. It does however produce fake signatures called "short-circuit +signatures" that are very useful for testing. See header documentation for details on short-circuit sigs.

+

This configuration (and only this configuration) uses a bundled SHA-256 implementation (SHA-256 is simple and easy to bundle, ECDSA is not).

+

To build run:

make -f Makefile.test
+

+OpenSSL Crypto – Makefile.ossl

+

This OpenSSL integration supports SHA-256, SHA-384 and SHA-512 with ECDSA, EdDSA, or RSAPSS to support the COSE algorithms ES256, ES384 and ES512, PS256, PS384 and PS512. It is a full and tested integration with OpenSSL crypto.

+

If OpenSSL is installed in /usr/local or as a standar library, you can probably just run make:

make -f Makefile.ossl
+

The specific things that Makefile.ossl does is:

    +
  • Links the crypto_adapters/t_cose_openssl_crypto.o into libt_cose.a
  • +
  • Links test/test/t_cose_make_openssl_test_key.o into the test binary
  • +
  • #define T_COSE_USE_OPENSSL_CRYPTO
  • +
+

t_cose is regularly tested against OpenSSL 1.1.1 and 3.0.

+

The crypto adaptor for OpenSSL is about twice the size of that for Mbed TLS because the API doesn't line up well with the needs for COSE (OpenSSL is ASN.1/DER oriented). Memory allocation is performed inside OpenSSL and in the crypto adaptation layer. This makes the OpenSSL crypto library less suitable for embedded use.

+

No deprecated or to-be-deprecated APIs are used.

+

There are several different sets of APIs in OpenSSL that can be used to implement ECDSA and hashing. The ones chosen are the most official and well-supported, however others might suit particular uses cases better. An older t_cose used some to-be-deprecated APIs and is a more efficient than this one. It is unfortunate that these APIs (ECDSA_do_sign and ECDSA_do_verify) are slated for deprecation and there is no supported alternative to those that work only with DER-encoded signatures.

+

There are no known problems with the code and test coverage for the adaptor is good. Not every single memory allocation failure has test coverage, but the code should handle them all correctly.

+

+PSA Crypto – Makefile.psa

+

As of March 2022, t_cose works with the PSA 1.0 Crypto API as implemented by Mbed TLS 2.x and 3.x.

+

This integration supports SHA-256, SHA-384 and SHA-512 with ECDSA, EdDSA or RSAPSS to support the COSE algorithms ES256, ES384 and ES512, PS256, PS384 and PS512.

+

If Mbed TLS is installed in /usr/local, you can probably just run make:

make -f Makefile.psa
+

If this doesn't work or you have Mbed TLS elsewhere edit the makefile.

+

The specific things that Makefile.psa does is:

    +
  • Links the crypto_adapters/t_cose_psa_crypto.o into libt_cose.a
  • +
  • Links test/test/t_cose_make_psa_test_key.o into the test binary
  • +
  • #define T_COSE_USE_PSA_CRYPTO
    +
  • +
+

This crypto adapter is small and simple. The adapter allocates no memory and as far as I know it internally allocates no memory. It is a good choice for embedded use.

+

It makes use of the 1.0 version of the PSA cryptographic API. No deprecated or to-be-deprecated functions are called (an older t_cose used some to be deprecated APIs).

+

It is regularly tested against the latest version 2 and version 3 of Mbed TLS, an implementation of the PSA crypto API.

+

Confidence in the adaptor code is high and reasonably well tested because it is simple.

+

+General Crypto Library Strategy

+

The functions that t_cose needs from the crypto library are all defined in src/t_cose_crypto.h. This is a porting or adaption layer. There are no #ifdefs in the main t_cose code for different crypto libraries. When it needs a crypto function it just calls the interface defined in t_cose_crypto.h.

+

When integrating t_cose with a new cryptographic library, what is necessary is to write some code, an "adaptor", that implements t_cose_crypto.h using the new target cryptographic library. This can be done without changes to any t_cose code for many cryptographic libraries. See the interface documentation in t_cose_crypto.h for what needs to be implemented.

+

That said, there is one case where t_cose source code needs to be modified. This is for hash algorithm implementations that are linked into and run inline with t_cose and that have a context structure. In this case t_cose_crypto.h should be modified to use that context structure. Use the OpenSSL configuration as an example.

+

To complete the set up for a new cryptographic library and test it, a new test adaptation file is also needed. This file makes public key pairs of the correct type for use with testing. This file is usually named test/t_cose_make_xxxx_test_key.c and is linked in with the test app. The keys it makes are passed through t_cose untouched, through the t_cose_crypto.h interface into the underlying crypto.

+

+Memory Usage

+

+Code

+

Here are code sizes on 64-bit x86 optimized for size

 |                           | smallest | largest |  
+ |---------------------------|----------|---------|
+ | signing only              |     1500 |    2300 |
+ | verification only         |     2500 |    3300 |
+ | common to sign and verify |     (500)|    (800)|
+ | combined                  |     3500 |    4800 |
+

Things that make the code smaller:

    +
  • PSA / Mbed crypto takes less code to interface with than OpenSSL
  • +
  • gcc is usually smaller than llvm because stack guards are off by default
  • +
  • Use only 256-bit crypto with the T_COSE_DISABLE_ESXXX options
  • +
  • Disable short-circut sig debug faclity T_COSE_DISABLE_SHORT_CIRCUIT_SIGN
  • +
  • Disable the content type header T_COSE_DISABLE_CONTENT_TYPE
  • +
+

+Change in code size with spiffy decode

+

The encode size is as before.

+

Compared to the previous t_cose, the code size for decoding/verifying is reduced by about 600 bytes. However, spiffy decode functions in QCBOR are now required and they are about 2KB, so there is a net size increase of 1.4KB. But use of spiffy decode will also make other parts of the overall SW stack smaller, perhaps by a lot, so this will likely break even. For example, EAT or CWT decoding will be reduced a lot through use of spiffy decode. Basically, the more CBOR maps a SW stack has to handle, the more saving there will be from spiffy decode.

+

+Heap and stack

+

Malloc is not used.

+

Stack usage is variable depending on the key and hash size and the stack usage by the cryptographic library that performs the hash and public key crypto functions. The maximum requirement is roughly 2KB. This is an estimate from examining the code, not an actual measurement.

+

Since the keys, hash outputs and signatures are stored on the stack, the stronger the security, the more stack is used. By default up to 512 bit EC is enabled. Disable 512 and 384 bit EC to reduce stack usage by about 100 bytes.

+

Different cryptographic libraries may have very different stack usage characteristics. For example if one use malloc rather than the stack, it will (hopefully) use less stack. The guess estimate range of usage by the cryptographic library is between 64 and 1024 bytes of stack.

+

Aside from the cryptographic library, the base stack use by t_cose is 500 bytes for signing and 1500 bytes for verification. With a large cryptographic library, the total is about 1500 bytes for signing and 2000 bytes for verification (for verification, the crypto library stack re uses stack used to decode header parameters so the increment isn't so large).

+

The design is such that only one copy of the output, the COSE_Sign1, need be in memory. It makes use of special features in QCBOR that allows contstuction of the output including the payload, using just the single output buffer to accomplish this.

+

A buffer to hold the signed COSE result must be passed in. It must be about 100 bytes larger than the combined size of the payload and key id for ECDSA 256. It can be allocated as the caller wishes.

+

+Crypto library memory usage

+

In addition to the above memory usage, the crypto library will use some stack and/or heap memory. This will vary quite a bit by crypto library. Some may use malloc. Some may not.

+

The OpenSSL library does use malloc, even with ECDSA. Another implementation of ECDSA might not use malloc, as the keys are small enough.

+

+Mixed code style

+

QCBOR uses camelCase and t_cose follows Arm's coding guidelines resulting in code with mixed styles. For better or worse, an Arm-style version of UsefulBuf is created and used and so there is a duplicate of UsefulBuf. The two are identical. They just have different names.

+

+Limitations

+
    +
  • Most inputs and outputs must be in a continguous buffer. One exception to this is that CBOR payloads being signed can be constructed piecemeal into the output buffer and signed without using a separate buffer.
  • +
  • Doesn't handle COSE string algorithm IDs. Only COSE integer algorithm IDs are handled. Thus far no string algorithm IDs have been assigned by IANA.
  • +
  • No way to add custom headers when creating signed messages or process them during verification.
  • +
  • Does not handle CBOR indefinite length strings (indefinite length maps and arrays are handled).
  • +
  • Counter signatures are not supported.
  • +
+

+Credit

+
    +
  • Paul Liétar for RSA PSS (PS256..PS512) and EdDSA
  • +
  • Maik Riechert for cmake, CI and other.
  • +
  • Ken Takayama for the bulk of the detached content implementation.
  • +
  • Tamas Ban for lots code review comments, design ideas and porting to ARM PSA.
  • +
  • Rob Coombs, Shebu Varghese Kuriakose and other ARM folks for sponsorship.
  • +
  • Michael Eckel for makefile fixes.
  • +
+

+Copyright and License

+

t_cose is available under the 3-Clause BSD License.

+
+
+ + + + diff --git a/jquery.js b/jquery.js new file mode 100644 index 00000000..103c32d7 --- /dev/null +++ b/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/menu.js b/menu.js new file mode 100644 index 00000000..2fe2214f --- /dev/null +++ b/menu.js @@ -0,0 +1,51 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
  • '); + } else { + $('#main-menu').append('
  • '); + } + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/menudata.js b/menudata.js new file mode 100644 index 00000000..7d07db8e --- /dev/null +++ b/menudata.js @@ -0,0 +1,42 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Data Structures",url:"annotated.html",children:[ +{text:"Data Structures",url:"annotated.html"}, +{text:"Data Structure Index",url:"classes.html"}, +{text:"Data Fields",url:"functions.html",children:[ +{text:"All",url:"functions.html"}, +{text:"Variables",url:"functions_vars.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}, +{text:"Globals",url:"globals.html",children:[ +{text:"All",url:"globals.html",children:[ +{text:"t",url:"globals.html#index_t"}]}, +{text:"Functions",url:"globals_func.html"}, +{text:"Enumerations",url:"globals_enum.html"}, +{text:"Enumerator",url:"globals_eval.html",children:[ +{text:"t",url:"globals_eval.html#index_t"}]}, +{text:"Macros",url:"globals_defs.html"}]}]}]} diff --git a/nav_f.png b/nav_f.png new file mode 100644 index 00000000..72a58a52 Binary files /dev/null and b/nav_f.png differ diff --git a/nav_g.png b/nav_g.png new file mode 100644 index 00000000..2093a237 Binary files /dev/null and b/nav_g.png differ diff --git a/nav_h.png b/nav_h.png new file mode 100644 index 00000000..33389b10 Binary files /dev/null and b/nav_h.png differ diff --git a/open.png b/open.png new file mode 100644 index 00000000..30f75c7e Binary files /dev/null and b/open.png differ diff --git a/q__useful__buf_8h.html b/q__useful__buf_8h.html new file mode 100644 index 00000000..0d999b33 --- /dev/null +++ b/q__useful__buf_8h.html @@ -0,0 +1,168 @@ + + + + + + + +t_cose: inc/t_cose/q_useful_buf.h File Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    q_useful_buf.h File Reference
    +
    +
    + +

    This is a TF-M coding style version of UsefulBuf. See UsefulBuf for documentation of these functions. +More...

    +
    #include "qcbor/UsefulBuf.h"
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + +

    +Macros

    +#define NULL_Q_USEFUL_BUF_C   NULLUsefulBufC
     
    +#define NULL_Q_USEFUL_BUF   NULLUsefulBuf
     
    +#define Q_USEFUL_BUF_FROM_SZ_LITERAL   UsefulBuf_FROM_SZ_LITERAL
     
    +#define Q_USEFUL_BUF_FROM_BYTE_ARRAY_LITERAL   UsefulBuf_FROM_BYTE_ARRAY_LITERAL
     
    +#define Q_USEFUL_BUF_MAKE_STACK_UB   UsefulBuf_MAKE_STACK_UB
     
    +#define Q_USEFUL_BUF_FROM_BYTE_ARRAY   UsefulBuf_FROM_BYTE_ARRAY
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    +static int q_useful_buf_c_is_null (struct q_useful_buf_c in)
     
    +static int q_useful_buf_is_null (struct q_useful_buf in)
     
    +static int q_useful_buf_c_is_empty (struct q_useful_buf_c in)
     
    +static int q_useful_buf_is_empty (struct q_useful_buf in)
     
    +static int q_useful_buf_is_null_or_empty (struct q_useful_buf in)
     
    +static int q_useful_buf_c_is_null_or_empty (struct q_useful_buf_c in)
     
    +static struct q_useful_buf_c q_usefulbuf_const (struct q_useful_buf ub)
     
    +static struct q_useful_buf q_useful_buf_unconst (struct q_useful_buf_c in)
     
    +static struct q_useful_buf_c q_useful_buf_from_sz (const char *string)
     
    +static struct q_useful_buf_c useful_buf_copy_offset (struct q_useful_buf dest, size_t offset, struct q_useful_buf_c src)
     
    +static struct q_useful_buf_c q_useful_buf_copy (struct q_useful_buf dest, struct q_useful_buf_c src)
     
    +static struct q_useful_buf_c q_useful_buf_set (struct q_useful_buf dest, uint8_t value)
     
    +static struct q_useful_buf_c q_useful_buf_copy_ptr (struct q_useful_buf d, const void *ptr, size_t len)
     
    +static struct q_useful_buf_c q_useful_buf_head (struct q_useful_buf_c buf, size_t amount)
     
    +static struct q_useful_buf_c q_useful_buf_tail (struct q_useful_buf_c buf, size_t amount)
     
    +static int q_useful_buf_compare (const struct q_useful_buf_c buf1, const struct q_useful_buf_c buf2)
     
    +static size_t q_useful_buf_is_value (const struct q_useful_buf_c buf, uint8_t uValue)
     
    +static size_t q_useful_buf_find_bytes (const struct q_useful_buf_c bytes_to_search, const struct q_useful_buf_c bytes_to_find)
     
    +

    Detailed Description

    +

    This is a TF-M coding style version of UsefulBuf. See UsefulBuf for documentation of these functions.

    +
    + + + + diff --git a/q__useful__buf_8h_source.html b/q__useful__buf_8h_source.html new file mode 100644 index 00000000..3b90489b --- /dev/null +++ b/q__useful__buf_8h_source.html @@ -0,0 +1,232 @@ + + + + + + + +t_cose: inc/t_cose/q_useful_buf.h Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    q_useful_buf.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  * q_useful_buf.h
    +
    3  *
    +
    4  * Copyright 2019, Laurence Lundblade
    +
    5  *
    +
    6  * SPDX-License-Identifier: BSD-3-Clause
    +
    7  *
    +
    8  * See BSD-3-Clause license in README.md
    +
    9  */
    +
    10 
    +
    11 
    +
    12 #ifndef __Q_USEFUL_BUF_H__
    +
    13 #define __Q_USEFUL_BUF_H__
    +
    14 
    +
    15 #include "qcbor/UsefulBuf.h"
    +
    16 
    +
    17 #ifdef __cplusplus
    +
    18 extern "C" {
    +
    19 #endif
    +
    20 
    +
    21 
    +
    30 #define NULL_Q_USEFUL_BUF_C NULLUsefulBufC
    +
    31 
    +
    32 #define NULL_Q_USEFUL_BUF NULLUsefulBuf
    +
    33 
    +
    34 
    +
    35 static inline int q_useful_buf_c_is_null(struct q_useful_buf_c in)
    +
    36 {
    +
    37  return UsefulBuf_IsNULLC(in);
    +
    38 }
    +
    39 
    +
    40 
    +
    41 static inline int q_useful_buf_is_null(struct q_useful_buf in)
    +
    42 {
    +
    43  return UsefulBuf_IsNULL(in);
    +
    44 }
    +
    45 
    +
    46 
    +
    47 static inline int q_useful_buf_c_is_empty(struct q_useful_buf_c in)
    +
    48 {
    +
    49  return UsefulBuf_IsEmptyC(in);
    +
    50 }
    +
    51 
    +
    52 static inline int q_useful_buf_is_empty(struct q_useful_buf in)
    +
    53 {
    +
    54  return UsefulBuf_IsEmpty(in);
    +
    55 }
    +
    56 
    +
    57 
    +
    58 static inline int q_useful_buf_is_null_or_empty(struct q_useful_buf in)
    +
    59 {
    +
    60  return UsefulBuf_IsNULLOrEmpty(in);
    +
    61 }
    +
    62 
    +
    63 
    +
    64 static inline int q_useful_buf_c_is_null_or_empty(struct q_useful_buf_c in)
    +
    65 {
    +
    66  return UsefulBuf_IsNULLOrEmptyC(in);
    +
    67 }
    +
    68 
    +
    69 static inline struct q_useful_buf_c q_usefulbuf_const(struct q_useful_buf ub)
    +
    70 {
    +
    71  return UsefulBuf_Const(ub);
    +
    72 }
    +
    73 
    +
    74 
    +
    75 static inline struct q_useful_buf q_useful_buf_unconst(struct q_useful_buf_c in)
    +
    76 {
    +
    77  return UsefulBuf_Unconst(in);
    +
    78 }
    +
    79 
    +
    80 #define Q_USEFUL_BUF_FROM_SZ_LITERAL UsefulBuf_FROM_SZ_LITERAL
    +
    81 
    +
    82 #define Q_USEFUL_BUF_FROM_BYTE_ARRAY_LITERAL UsefulBuf_FROM_BYTE_ARRAY_LITERAL
    +
    83 
    +
    84 #define Q_USEFUL_BUF_MAKE_STACK_UB UsefulBuf_MAKE_STACK_UB
    +
    85 
    +
    86 #define Q_USEFUL_BUF_FROM_BYTE_ARRAY UsefulBuf_FROM_BYTE_ARRAY
    +
    87 
    +
    88 
    +
    89 static inline struct q_useful_buf_c q_useful_buf_from_sz(const char *string)
    +
    90 {
    +
    91  return UsefulBuf_FromSZ(string);
    +
    92 }
    +
    93 
    +
    94 static inline struct q_useful_buf_c
    +
    95 useful_buf_copy_offset(struct q_useful_buf dest,
    +
    96  size_t offset,
    +
    97  struct q_useful_buf_c src)
    +
    98 {
    +
    99  return UsefulBuf_CopyOffset(dest, offset, src);
    +
    100 }
    +
    101 
    +
    102 
    +
    103 
    +
    104 static inline struct q_useful_buf_c q_useful_buf_copy(struct q_useful_buf dest,
    +
    105  struct q_useful_buf_c src)
    +
    106 {
    +
    107  return UsefulBuf_Copy(dest, src);
    +
    108 }
    +
    109 
    +
    110 
    +
    111 static inline struct q_useful_buf_c q_useful_buf_set(struct q_useful_buf dest,
    +
    112  uint8_t value)
    +
    113 {
    +
    114  return UsefulBuf_Set(dest, value);
    +
    115 }
    +
    116 
    +
    117 
    +
    118 static inline struct q_useful_buf_c q_useful_buf_copy_ptr(struct q_useful_buf d,
    +
    119  const void *ptr,
    +
    120  size_t len)
    +
    121 {
    +
    122  return UsefulBuf_CopyPtr(d, ptr, len);
    +
    123 }
    +
    124 
    +
    125 
    +
    126 static inline struct q_useful_buf_c q_useful_buf_head(struct q_useful_buf_c buf,
    +
    127  size_t amount)
    +
    128 {
    +
    129  return UsefulBuf_Head(buf, amount);
    +
    130 }
    +
    131 
    +
    132 static inline struct q_useful_buf_c q_useful_buf_tail(struct q_useful_buf_c buf,
    +
    133  size_t amount)
    +
    134 {
    +
    135  return UsefulBuf_Tail(buf, amount);
    +
    136 }
    +
    137 
    +
    138 static inline int q_useful_buf_compare(const struct q_useful_buf_c buf1,
    +
    139  const struct q_useful_buf_c buf2)
    +
    140 {
    +
    141  return UsefulBuf_Compare(buf1, buf2);
    +
    142 }
    +
    143 
    +
    144 static inline size_t q_useful_buf_is_value(const struct q_useful_buf_c buf,
    +
    145  uint8_t uValue)
    +
    146 {
    +
    147  return UsefulBuf_IsValue(buf, uValue);
    +
    148 }
    +
    149 
    +
    150 static inline size_t
    +
    151 q_useful_buf_find_bytes(const struct q_useful_buf_c bytes_to_search,
    +
    152  const struct q_useful_buf_c bytes_to_find)
    +
    153 {
    +
    154  return UsefulBuf_FindBytes(bytes_to_search, bytes_to_find);
    +
    155 }
    +
    156 
    +
    157 
    +
    158 #ifdef __cplusplus
    +
    159 }
    +
    160 #endif
    +
    161 
    +
    162 #endif /* __Q_USEFUL_BUF_H__ */
    +
    + + + + diff --git a/search/all_0.html b/search/all_0.html new file mode 100644 index 00000000..1ec5b2d5 --- /dev/null +++ b/search/all_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_0.js b/search/all_0.js new file mode 100644 index 00000000..44d348e2 --- /dev/null +++ b/search/all_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['auxiliary_5fbuffer_0',['auxiliary_buffer',['../structt__cose__sign1__sign__ctx.html#ab697ed23525f68c9453f1c59683d2fe6',1,'t_cose_sign1_sign_ctx::auxiliary_buffer()'],['../structt__cose__sign1__verify__ctx.html#ab64c2b053b179878106b3e2b633bea78',1,'t_cose_sign1_verify_ctx::auxiliary_buffer()']]] +]; diff --git a/search/all_1.html b/search/all_1.html new file mode 100644 index 00000000..9f80e904 --- /dev/null +++ b/search/all_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_1.js b/search/all_1.js new file mode 100644 index 00000000..09ff1016 --- /dev/null +++ b/search/all_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['content_5ftype_5ftstr_1',['content_type_tstr',['../structt__cose__parameters.html#af5e34b628abd42b03918d79e232330ba',1,'t_cose_parameters']]], + ['content_5ftype_5fuint_2',['content_type_uint',['../structt__cose__parameters.html#ae4795e9e24ed60d90c08bcbfb955602b',1,'t_cose_parameters']]], + ['cose_5falgorithm_5fid_3',['cose_algorithm_id',['../structt__cose__parameters.html#aaae07443d755c224874972e000dfe716',1,'t_cose_parameters']]], + ['crypto_5flib_4',['crypto_lib',['../structt__cose__key.html#ab33f3c0068eb61732cfb8f0868d2a770',1,'t_cose_key']]] +]; diff --git a/search/all_2.html b/search/all_2.html new file mode 100644 index 00000000..02cfffc2 --- /dev/null +++ b/search/all_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_2.js b/search/all_2.js new file mode 100644 index 00000000..4526516f --- /dev/null +++ b/search/all_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['iv_5',['iv',['../structt__cose__parameters.html#a6ae05b0b140d2cd932a539478a825c02',1,'t_cose_parameters']]] +]; diff --git a/search/all_3.html b/search/all_3.html new file mode 100644 index 00000000..39767b85 --- /dev/null +++ b/search/all_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_3.js b/search/all_3.js new file mode 100644 index 00000000..46941493 --- /dev/null +++ b/search/all_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['key_5fhandle_6',['key_handle',['../structt__cose__key.html#a88cd5054b83b116768dfc0b8d3bc34ec',1,'t_cose_key']]], + ['key_5fptr_7',['key_ptr',['../structt__cose__key.html#aff509e374a6ff6331cbfe33b8640ef5c',1,'t_cose_key']]], + ['kid_8',['kid',['../structt__cose__parameters.html#a9a12c4390359f47cf14f485280cb0007',1,'t_cose_parameters']]] +]; diff --git a/search/all_4.html b/search/all_4.html new file mode 100644 index 00000000..fc40463c --- /dev/null +++ b/search/all_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_4.js b/search/all_4.js new file mode 100644 index 00000000..dc115433 --- /dev/null +++ b/search/all_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['partial_5fiv_9',['partial_iv',['../structt__cose__parameters.html#ad8a4fa4384065c2e593bfc3d8b0b4a62',1,'t_cose_parameters']]] +]; diff --git a/search/all_5.html b/search/all_5.html new file mode 100644 index 00000000..9dd9344b --- /dev/null +++ b/search/all_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_5.js b/search/all_5.js new file mode 100644 index 00000000..696d9097 --- /dev/null +++ b/search/all_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['q_5fuseful_5fbuf_2eh_10',['q_useful_buf.h',['../q__useful__buf_8h.html',1,'']]] +]; diff --git a/search/all_6.html b/search/all_6.html new file mode 100644 index 00000000..f1e516d7 --- /dev/null +++ b/search/all_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/all_6.js b/search/all_6.js new file mode 100644 index 00000000..2ff3b3f4 --- /dev/null +++ b/search/all_6.js @@ -0,0 +1,100 @@ +var searchData= +[ + ['t_5fcose_5falgorithm_5feddsa_11',['T_COSE_ALGORITHM_EDDSA',['../t__cose__common_8h.html#a6c5b2fb05cee3f0d720aafb1ceabd22f',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fes256_12',['T_COSE_ALGORITHM_ES256',['../t__cose__common_8h.html#ae11a8d65947b591d0861a7858dc256f9',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fes384_13',['T_COSE_ALGORITHM_ES384',['../t__cose__common_8h.html#abdbae1e0d1a3d1639de1166ac563720b',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fes512_14',['T_COSE_ALGORITHM_ES512',['../t__cose__common_8h.html#a54b34efe93ddee10b5965884fa2c191a',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fps256_15',['T_COSE_ALGORITHM_PS256',['../t__cose__common_8h.html#a3d961942840e28c4a7275b49025837ee',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fps384_16',['T_COSE_ALGORITHM_PS384',['../t__cose__common_8h.html#ad14801a4dac2cf35124327a473327cdd',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fps512_17',['T_COSE_ALGORITHM_PS512',['../t__cose__common_8h.html#a0ac770d5b638baa673c7748a7ac80535',1,'t_cose_common.h']]], + ['t_5fcose_5fcommon_2eh_18',['t_cose_common.h',['../t__cose__common_8h.html',1,'']]], + ['t_5fcose_5fcrypto_5flib_5fopenssl_19',['T_COSE_CRYPTO_LIB_OPENSSL',['../t__cose__common_8h.html#a176820fa3ec3736c520c498754c42c80a276494742d3f14bc2dead02a4b1eb30a',1,'t_cose_common.h']]], + ['t_5fcose_5fcrypto_5flib_5fpsa_20',['T_COSE_CRYPTO_LIB_PSA',['../t__cose__common_8h.html#a176820fa3ec3736c520c498754c42c80a13894fa83c5858b66176f387f1def260',1,'t_cose_common.h']]], + ['t_5fcose_5fcrypto_5flib_5ft_21',['t_cose_crypto_lib_t',['../t__cose__common_8h.html#a176820fa3ec3736c520c498754c42c80',1,'t_cose_common.h']]], + ['t_5fcose_5fcrypto_5flib_5funidentified_22',['T_COSE_CRYPTO_LIB_UNIDENTIFIED',['../t__cose__common_8h.html#a176820fa3ec3736c520c498754c42c80a9f7859bd0fdd4bea90071963b6fad7c9',1,'t_cose_common.h']]], + ['t_5fcose_5fempty_5fuint_5fcontent_5ftype_23',['T_COSE_EMPTY_UINT_CONTENT_TYPE',['../t__cose__common_8h.html#a7c3f10122accf3f67342cfc1b01efe29',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fauxiliary_5fbuffer_5fsize_24',['T_COSE_ERR_AUXILIARY_BUFFER_SIZE',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97af378f760a3bc2c46f0b8c8bcf21d166d',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fbad_5fcontent_5ftype_25',['T_COSE_ERR_BAD_CONTENT_TYPE',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a71e4706e64054800449d2b6b43e784e7',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fbad_5fshort_5fcircuit_5fkid_26',['T_COSE_ERR_BAD_SHORT_CIRCUIT_KID',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a5bbe5a71b10c42e8cd15c3ac10929aa5',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fcbor_5fformatting_27',['T_COSE_ERR_CBOR_FORMATTING',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a55918d35446a01bc83420c075ed6575c',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fcbor_5fnot_5fwell_5fformed_28',['T_COSE_ERR_CBOR_NOT_WELL_FORMED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a32bb5758b1ca42ff8c2f26f2cd1f9677',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fcrit_5fparameter_29',['T_COSE_ERR_CRIT_PARAMETER',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a14933066d901f73e408ef6291cd05ec6',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fduplicate_5fparameter_30',['T_COSE_ERR_DUPLICATE_PARAMETER',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a8f118d6979c8c81cef8c6250e969bed9',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fempty_5fkey_31',['T_COSE_ERR_EMPTY_KEY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97afb85050af8b7c7b52e98037f488af908',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ffail_32',['T_COSE_ERR_FAIL',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ac8dc7baf553416aa58a4e75b85fe8a43',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fhash_5fbuffer_5fsize_33',['T_COSE_ERR_HASH_BUFFER_SIZE',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a9c2ed558f43d8c61b47df5a915882ce3',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fhash_5fgeneral_5ffail_34',['T_COSE_ERR_HASH_GENERAL_FAIL',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a2f6dbdc48f5c336294939206be57050f',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fincorrect_5fkey_5ffor_5flib_35',['T_COSE_ERR_INCORRECT_KEY_FOR_LIB',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a2ab0422ae3754b216f0be0cb7a0bf7e7',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fincorrectly_5ftagged_36',['T_COSE_ERR_INCORRECTLY_TAGGED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a7a9a9b13e67d007b3e7ca588673fca5e',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5finsufficient_5fmemory_37',['T_COSE_ERR_INSUFFICIENT_MEMORY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a12fa420684f349537218b78249df4c99',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5finvalid_5fargument_38',['T_COSE_ERR_INVALID_ARGUMENT',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ac6ade080d5e7913536a99bbea9cc7155',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fmaking_5fprotected_39',['T_COSE_ERR_MAKING_PROTECTED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ad9a45396e6cb020dbf486a256205140f',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fneed_5fauxiliary_5fbuffer_40',['T_COSE_ERR_NEED_AUXILIARY_BUFFER',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a4620417cbd3aa99a57c39ccf961775c7',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fno_5falg_5fid_41',['T_COSE_ERR_NO_ALG_ID',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ae91148a631c2e77d96be2272702a27ae',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fno_5fkid_42',['T_COSE_ERR_NO_KID',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a23a974983ca9295bbd4a6b7f000d6c25',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fnon_5finteger_5falg_5fid_43',['T_COSE_ERR_NON_INTEGER_ALG_ID',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a771da30e84f7362ef3c6fb85119f48b1',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fparameter_5fcbor_44',['T_COSE_ERR_PARAMETER_CBOR',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97abe81b9babfd3ae1e8ea7594e865e5ed9',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fparameter_5fnot_5fprotected_45',['T_COSE_ERR_PARAMETER_NOT_PROTECTED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a87c9924e60ccc5de0c8c627925ec3115',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fshort_5fcircuit_5fsig_46',['T_COSE_ERR_SHORT_CIRCUIT_SIG',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a41d3ab8c5e848ecb778f31afa0154b67',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fshort_5fcircuit_5fsig_5fdisabled_47',['T_COSE_ERR_SHORT_CIRCUIT_SIG_DISABLED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97aa9fefad7e9df7cc8667ed740dbd3415d',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsig_5fbuffer_5fsize_48',['T_COSE_ERR_SIG_BUFFER_SIZE',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a1be31366358fbee54e60d2fbb54339e4',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsig_5ffail_49',['T_COSE_ERR_SIG_FAIL',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97acf6ac8e6a5abe5b71ce8b0e2b28de9b4',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsig_5fstruct_50',['T_COSE_ERR_SIG_STRUCT',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a8a37e34cac4caa1ae7386249e23a0e46',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsig_5fverify_51',['T_COSE_ERR_SIG_VERIFY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a5629e71ec5fce4c867421b014481fb22',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsign1_5fformat_52',['T_COSE_ERR_SIGN1_FORMAT',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a3b506bca4791f5bdeeb46a84d13098a6',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ft_53',['t_cose_err_t',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ftampering_5fdetected_54',['T_COSE_ERR_TAMPERING_DETECTED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a7d5df35f191e8266d36e0d6f67373893',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ftoo_5fmany_5fparameters_55',['T_COSE_ERR_TOO_MANY_PARAMETERS',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97aa2a158c2198a24c1d22ba3706ff8182b',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ftoo_5fmany_5ftags_56',['T_COSE_ERR_TOO_MANY_TAGS',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a77ad5de51192f668baba652222d8b75c',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ftoo_5fsmall_57',['T_COSE_ERR_TOO_SMALL',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a6944828acdfc4abfea5f73be83c3f60c',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5funknown_5fcritical_5fparameter_58',['T_COSE_ERR_UNKNOWN_CRITICAL_PARAMETER',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a97e707b3428ea321bdeb78a1464b3d4c',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5funknown_5fkey_59',['T_COSE_ERR_UNKNOWN_KEY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97aa911e3edc09368e70a6c479f885c0653',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5funsupported_5fhash_60',['T_COSE_ERR_UNSUPPORTED_HASH',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a23ead60b8042fc626278f6d5b53337fb',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5funsupported_5fsigning_5falg_61',['T_COSE_ERR_UNSUPPORTED_SIGNING_ALG',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a00f60307d04d9ab84e004750ae549907',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fwrong_5ftype_5fof_5fkey_62',['T_COSE_ERR_WRONG_TYPE_OF_KEY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a16e0fbcd278ad51a8bfbe684d90cf3c8',1,'t_cose_common.h']]], + ['t_5fcose_5fis_5falgorithm_5fsupported_63',['t_cose_is_algorithm_supported',['../t__cose__common_8h.html#adba9c7de9edd81e1cec35c8259360f2b',1,'t_cose_common.h']]], + ['t_5fcose_5fkey_64',['t_cose_key',['../structt__cose__key.html',1,'']]], + ['t_5fcose_5fmax_5ftags_5fto_5freturn_65',['T_COSE_MAX_TAGS_TO_RETURN',['../t__cose__sign1__verify_8h.html#a7a0e083f1728e5e46fc28d913e771b4a',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fnull_5fkey_66',['T_COSE_NULL_KEY',['../t__cose__common_8h.html#abcd4fbd3293bbf04c490aee37358133f',1,'t_cose_common.h']]], + ['t_5fcose_5fopt_5fallow_5fshort_5fcircuit_67',['T_COSE_OPT_ALLOW_SHORT_CIRCUIT',['../t__cose__sign1__verify_8h.html#ad328fd848dd7d1073d561a2257311044',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5fdecode_5fonly_68',['T_COSE_OPT_DECODE_ONLY',['../t__cose__sign1__verify_8h.html#a2cb33a6b92d0e94a782f48122949112d',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5fomit_5fcbor_5ftag_69',['T_COSE_OPT_OMIT_CBOR_TAG',['../t__cose__sign1__sign_8h.html#a5ee410eed263e483e21a982c3c19a73d',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fopt_5frequire_5fkid_70',['T_COSE_OPT_REQUIRE_KID',['../t__cose__sign1__verify_8h.html#a2f24861e9022566e6438d9c2008e6462',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5fshort_5fcircuit_5fsig_71',['T_COSE_OPT_SHORT_CIRCUIT_SIG',['../t__cose__sign1__sign_8h.html#a83d4e7ad0c4ada63f17d4b1e8fa0cc56',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fopt_5ftag_5fprohibited_72',['T_COSE_OPT_TAG_PROHIBITED',['../t__cose__sign1__verify_8h.html#affd9a42aee707f6420b5989d8f8ba8ad',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5ftag_5frequired_73',['T_COSE_OPT_TAG_REQUIRED',['../t__cose__sign1__verify_8h.html#a90405104cfdb40a5556f4e2f6ab0350d',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5funknown_5fcrit_5fallowed_74',['T_COSE_OPT_UNKNOWN_CRIT_ALLOWED',['../t__cose__sign1__verify_8h.html#a787602aea3b29cd638ff506921c50495',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fparameter_5flist_5fmax_75',['T_COSE_PARAMETER_LIST_MAX',['../t__cose__common_8h.html#a563daa2c5e3ba2452e4e188a273a59a3',1,'t_cose_common.h']]], + ['t_5fcose_5fparameters_76',['t_cose_parameters',['../structt__cose__parameters.html',1,'']]], + ['t_5fcose_5fsign1_5fencode_5fparameters_77',['t_cose_sign1_encode_parameters',['../t__cose__sign1__sign_8h.html#af73770fd0b41fe8e02b96c3bf1b1ff5b',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fencode_5fparameters_5finternal_78',['t_cose_sign1_encode_parameters_internal',['../t__cose__sign1__sign_8h.html#ad26725f3b777b55c12b591e58486175b',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fencode_5fsignature_79',['t_cose_sign1_encode_signature',['../t__cose__sign1__sign_8h.html#a2fb49347c0e17be027119524b4f87aee',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fencode_5fsignature_5faad_80',['t_cose_sign1_encode_signature_aad',['../t__cose__sign1__sign_8h.html#ae47cd48d67b9c541e8e190ff0e11044b',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fencode_5fsignature_5faad_5finternal_81',['t_cose_sign1_encode_signature_aad_internal',['../t__cose__sign1__sign_8h.html#ae26fa49b789a22073dc8c33011b1b342',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fget_5fnth_5ftag_82',['t_cose_sign1_get_nth_tag',['../t__cose__sign1__verify_8h.html#a8be686d6c16bb92cf6b99c9630f47d07',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fset_5fcontent_5ftype_5ftstr_83',['t_cose_sign1_set_content_type_tstr',['../t__cose__sign1__sign_8h.html#adf844d0f99b8baf6e537bca30bf1dc86',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fset_5fcontent_5ftype_5fuint_84',['t_cose_sign1_set_content_type_uint',['../t__cose__sign1__sign_8h.html#a7dbaf33da0b33b933d017c4c2a194754',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fset_5fsigning_5fkey_85',['t_cose_sign1_set_signing_key',['../t__cose__sign1__sign_8h.html#a0a6ad134b6ec8899bbc00d7f127f8c90',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fset_5fverification_5fkey_86',['t_cose_sign1_set_verification_key',['../t__cose__sign1__verify_8h.html#aaa2559755efcee6aad19cb472dc2461d',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fsign_87',['t_cose_sign1_sign',['../t__cose__sign1__sign_8h.html#a0ef546f0592def62dc6046bad9dccc49',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_2eh_88',['t_cose_sign1_sign.h',['../t__cose__sign1__sign_8h.html',1,'']]], + ['t_5fcose_5fsign1_5fsign_5faad_89',['t_cose_sign1_sign_aad',['../t__cose__sign1__sign_8h.html#ac10f120452cdfb826ae59c4f06d655e3',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5faad_5finternal_90',['t_cose_sign1_sign_aad_internal',['../t__cose__sign1__sign_8h.html#a17c8eff95f685a4176c557554b8fae75',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5fauxiliary_5fbuffer_5fsize_91',['t_cose_sign1_sign_auxiliary_buffer_size',['../t__cose__sign1__sign_8h.html#aa85ec748b1fe4a76f6d233885e341f52',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5fctx_92',['t_cose_sign1_sign_ctx',['../structt__cose__sign1__sign__ctx.html',1,'']]], + ['t_5fcose_5fsign1_5fsign_5fdetached_93',['t_cose_sign1_sign_detached',['../t__cose__sign1__sign_8h.html#a22824de9715e00a6d68b2ac7e5b59362',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5finit_94',['t_cose_sign1_sign_init',['../t__cose__sign1__sign_8h.html#aae6514c427217c90d4701a38bc4ca6f9',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5fset_5fauxiliary_5fbuffer_95',['t_cose_sign1_sign_set_auxiliary_buffer',['../t__cose__sign1__sign_8h.html#a8d2fed9b134082635e0d083cbeab6c8d',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fverify_96',['t_cose_sign1_verify',['../t__cose__sign1__verify_8h.html#ab14a59bbe3e640de21ea4f8e34abf3c9',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_2eh_97',['t_cose_sign1_verify.h',['../t__cose__sign1__verify_8h.html',1,'']]], + ['t_5fcose_5fsign1_5fverify_5faad_98',['t_cose_sign1_verify_aad',['../t__cose__sign1__verify_8h.html#abd75fb94e37e3254bb02e7c34134f0b7',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5fauxiliary_5fbuffer_5fsize_99',['t_cose_sign1_verify_auxiliary_buffer_size',['../t__cose__sign1__verify_8h.html#a3a3b69b76f045df2797693e89b08d484',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5fctx_100',['t_cose_sign1_verify_ctx',['../structt__cose__sign1__verify__ctx.html',1,'']]], + ['t_5fcose_5fsign1_5fverify_5fdetached_101',['t_cose_sign1_verify_detached',['../t__cose__sign1__verify_8h.html#a6a70be60718c904dea54596e8e807b69',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5finit_102',['t_cose_sign1_verify_init',['../t__cose__sign1__verify_8h.html#aa17ffa96916517e6ea735f68f654bf55',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5finternal_103',['t_cose_sign1_verify_internal',['../t__cose__sign1__verify_8h.html#ac04166c4f43e9437bdb3a0894ebc933d',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5fset_5fauxiliary_5fbuffer_104',['t_cose_sign1_verify_set_auxiliary_buffer',['../t__cose__sign1__verify_8h.html#ae5e954dddff8f2d6671b90393bf58a35',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsuccess_105',['T_COSE_SUCCESS',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ae2154f945afa7323af954692b10c87ec',1,'t_cose_common.h']]], + ['t_5fcose_5funset_5falgorithm_5fid_106',['T_COSE_UNSET_ALGORITHM_ID',['../t__cose__sign1__verify_8h.html#a169de8b83e560ed669edf9354dff800e',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fversion_5fmajor_107',['T_COSE_VERSION_MAJOR',['../t__cose__common_8h.html#acb92c20b398325c8c65aab25630e01a7',1,'t_cose_common.h']]] +]; diff --git a/search/classes_0.html b/search/classes_0.html new file mode 100644 index 00000000..af8159ee --- /dev/null +++ b/search/classes_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/classes_0.js b/search/classes_0.js new file mode 100644 index 00000000..30fcd452 --- /dev/null +++ b/search/classes_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['t_5fcose_5fkey_108',['t_cose_key',['../structt__cose__key.html',1,'']]], + ['t_5fcose_5fparameters_109',['t_cose_parameters',['../structt__cose__parameters.html',1,'']]], + ['t_5fcose_5fsign1_5fsign_5fctx_110',['t_cose_sign1_sign_ctx',['../structt__cose__sign1__sign__ctx.html',1,'']]], + ['t_5fcose_5fsign1_5fverify_5fctx_111',['t_cose_sign1_verify_ctx',['../structt__cose__sign1__verify__ctx.html',1,'']]] +]; diff --git a/search/close.svg b/search/close.svg new file mode 100644 index 00000000..a933eea1 --- /dev/null +++ b/search/close.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/search/defines_0.html b/search/defines_0.html new file mode 100644 index 00000000..15cc3de3 --- /dev/null +++ b/search/defines_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/defines_0.js b/search/defines_0.js new file mode 100644 index 00000000..f06fff47 --- /dev/null +++ b/search/defines_0.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['t_5fcose_5falgorithm_5feddsa_195',['T_COSE_ALGORITHM_EDDSA',['../t__cose__common_8h.html#a6c5b2fb05cee3f0d720aafb1ceabd22f',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fes256_196',['T_COSE_ALGORITHM_ES256',['../t__cose__common_8h.html#ae11a8d65947b591d0861a7858dc256f9',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fes384_197',['T_COSE_ALGORITHM_ES384',['../t__cose__common_8h.html#abdbae1e0d1a3d1639de1166ac563720b',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fes512_198',['T_COSE_ALGORITHM_ES512',['../t__cose__common_8h.html#a54b34efe93ddee10b5965884fa2c191a',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fps256_199',['T_COSE_ALGORITHM_PS256',['../t__cose__common_8h.html#a3d961942840e28c4a7275b49025837ee',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fps384_200',['T_COSE_ALGORITHM_PS384',['../t__cose__common_8h.html#ad14801a4dac2cf35124327a473327cdd',1,'t_cose_common.h']]], + ['t_5fcose_5falgorithm_5fps512_201',['T_COSE_ALGORITHM_PS512',['../t__cose__common_8h.html#a0ac770d5b638baa673c7748a7ac80535',1,'t_cose_common.h']]], + ['t_5fcose_5fempty_5fuint_5fcontent_5ftype_202',['T_COSE_EMPTY_UINT_CONTENT_TYPE',['../t__cose__common_8h.html#a7c3f10122accf3f67342cfc1b01efe29',1,'t_cose_common.h']]], + ['t_5fcose_5fmax_5ftags_5fto_5freturn_203',['T_COSE_MAX_TAGS_TO_RETURN',['../t__cose__sign1__verify_8h.html#a7a0e083f1728e5e46fc28d913e771b4a',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fnull_5fkey_204',['T_COSE_NULL_KEY',['../t__cose__common_8h.html#abcd4fbd3293bbf04c490aee37358133f',1,'t_cose_common.h']]], + ['t_5fcose_5fopt_5fallow_5fshort_5fcircuit_205',['T_COSE_OPT_ALLOW_SHORT_CIRCUIT',['../t__cose__sign1__verify_8h.html#ad328fd848dd7d1073d561a2257311044',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5fdecode_5fonly_206',['T_COSE_OPT_DECODE_ONLY',['../t__cose__sign1__verify_8h.html#a2cb33a6b92d0e94a782f48122949112d',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5fomit_5fcbor_5ftag_207',['T_COSE_OPT_OMIT_CBOR_TAG',['../t__cose__sign1__sign_8h.html#a5ee410eed263e483e21a982c3c19a73d',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fopt_5frequire_5fkid_208',['T_COSE_OPT_REQUIRE_KID',['../t__cose__sign1__verify_8h.html#a2f24861e9022566e6438d9c2008e6462',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5fshort_5fcircuit_5fsig_209',['T_COSE_OPT_SHORT_CIRCUIT_SIG',['../t__cose__sign1__sign_8h.html#a83d4e7ad0c4ada63f17d4b1e8fa0cc56',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fopt_5ftag_5fprohibited_210',['T_COSE_OPT_TAG_PROHIBITED',['../t__cose__sign1__verify_8h.html#affd9a42aee707f6420b5989d8f8ba8ad',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5ftag_5frequired_211',['T_COSE_OPT_TAG_REQUIRED',['../t__cose__sign1__verify_8h.html#a90405104cfdb40a5556f4e2f6ab0350d',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fopt_5funknown_5fcrit_5fallowed_212',['T_COSE_OPT_UNKNOWN_CRIT_ALLOWED',['../t__cose__sign1__verify_8h.html#a787602aea3b29cd638ff506921c50495',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fparameter_5flist_5fmax_213',['T_COSE_PARAMETER_LIST_MAX',['../t__cose__common_8h.html#a563daa2c5e3ba2452e4e188a273a59a3',1,'t_cose_common.h']]], + ['t_5fcose_5funset_5falgorithm_5fid_214',['T_COSE_UNSET_ALGORITHM_ID',['../t__cose__sign1__verify_8h.html#a169de8b83e560ed669edf9354dff800e',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fversion_5fmajor_215',['T_COSE_VERSION_MAJOR',['../t__cose__common_8h.html#acb92c20b398325c8c65aab25630e01a7',1,'t_cose_common.h']]] +]; diff --git a/search/enums_0.html b/search/enums_0.html new file mode 100644 index 00000000..141fff57 --- /dev/null +++ b/search/enums_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/enums_0.js b/search/enums_0.js new file mode 100644 index 00000000..e0b87daa --- /dev/null +++ b/search/enums_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['t_5fcose_5fcrypto_5flib_5ft_151',['t_cose_crypto_lib_t',['../t__cose__common_8h.html#a176820fa3ec3736c520c498754c42c80',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ft_152',['t_cose_err_t',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97',1,'t_cose_common.h']]] +]; diff --git a/search/enumvalues_0.html b/search/enumvalues_0.html new file mode 100644 index 00000000..0d131d95 --- /dev/null +++ b/search/enumvalues_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/enumvalues_0.js b/search/enumvalues_0.js new file mode 100644 index 00000000..6be063b5 --- /dev/null +++ b/search/enumvalues_0.js @@ -0,0 +1,45 @@ +var searchData= +[ + ['t_5fcose_5fcrypto_5flib_5fopenssl_153',['T_COSE_CRYPTO_LIB_OPENSSL',['../t__cose__common_8h.html#a176820fa3ec3736c520c498754c42c80a276494742d3f14bc2dead02a4b1eb30a',1,'t_cose_common.h']]], + ['t_5fcose_5fcrypto_5flib_5fpsa_154',['T_COSE_CRYPTO_LIB_PSA',['../t__cose__common_8h.html#a176820fa3ec3736c520c498754c42c80a13894fa83c5858b66176f387f1def260',1,'t_cose_common.h']]], + ['t_5fcose_5fcrypto_5flib_5funidentified_155',['T_COSE_CRYPTO_LIB_UNIDENTIFIED',['../t__cose__common_8h.html#a176820fa3ec3736c520c498754c42c80a9f7859bd0fdd4bea90071963b6fad7c9',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fauxiliary_5fbuffer_5fsize_156',['T_COSE_ERR_AUXILIARY_BUFFER_SIZE',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97af378f760a3bc2c46f0b8c8bcf21d166d',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fbad_5fcontent_5ftype_157',['T_COSE_ERR_BAD_CONTENT_TYPE',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a71e4706e64054800449d2b6b43e784e7',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fbad_5fshort_5fcircuit_5fkid_158',['T_COSE_ERR_BAD_SHORT_CIRCUIT_KID',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a5bbe5a71b10c42e8cd15c3ac10929aa5',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fcbor_5fformatting_159',['T_COSE_ERR_CBOR_FORMATTING',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a55918d35446a01bc83420c075ed6575c',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fcbor_5fnot_5fwell_5fformed_160',['T_COSE_ERR_CBOR_NOT_WELL_FORMED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a32bb5758b1ca42ff8c2f26f2cd1f9677',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fcrit_5fparameter_161',['T_COSE_ERR_CRIT_PARAMETER',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a14933066d901f73e408ef6291cd05ec6',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fduplicate_5fparameter_162',['T_COSE_ERR_DUPLICATE_PARAMETER',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a8f118d6979c8c81cef8c6250e969bed9',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fempty_5fkey_163',['T_COSE_ERR_EMPTY_KEY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97afb85050af8b7c7b52e98037f488af908',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ffail_164',['T_COSE_ERR_FAIL',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ac8dc7baf553416aa58a4e75b85fe8a43',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fhash_5fbuffer_5fsize_165',['T_COSE_ERR_HASH_BUFFER_SIZE',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a9c2ed558f43d8c61b47df5a915882ce3',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fhash_5fgeneral_5ffail_166',['T_COSE_ERR_HASH_GENERAL_FAIL',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a2f6dbdc48f5c336294939206be57050f',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fincorrect_5fkey_5ffor_5flib_167',['T_COSE_ERR_INCORRECT_KEY_FOR_LIB',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a2ab0422ae3754b216f0be0cb7a0bf7e7',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fincorrectly_5ftagged_168',['T_COSE_ERR_INCORRECTLY_TAGGED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a7a9a9b13e67d007b3e7ca588673fca5e',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5finsufficient_5fmemory_169',['T_COSE_ERR_INSUFFICIENT_MEMORY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a12fa420684f349537218b78249df4c99',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5finvalid_5fargument_170',['T_COSE_ERR_INVALID_ARGUMENT',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ac6ade080d5e7913536a99bbea9cc7155',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fmaking_5fprotected_171',['T_COSE_ERR_MAKING_PROTECTED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ad9a45396e6cb020dbf486a256205140f',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fneed_5fauxiliary_5fbuffer_172',['T_COSE_ERR_NEED_AUXILIARY_BUFFER',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a4620417cbd3aa99a57c39ccf961775c7',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fno_5falg_5fid_173',['T_COSE_ERR_NO_ALG_ID',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ae91148a631c2e77d96be2272702a27ae',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fno_5fkid_174',['T_COSE_ERR_NO_KID',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a23a974983ca9295bbd4a6b7f000d6c25',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fnon_5finteger_5falg_5fid_175',['T_COSE_ERR_NON_INTEGER_ALG_ID',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a771da30e84f7362ef3c6fb85119f48b1',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fparameter_5fcbor_176',['T_COSE_ERR_PARAMETER_CBOR',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97abe81b9babfd3ae1e8ea7594e865e5ed9',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fparameter_5fnot_5fprotected_177',['T_COSE_ERR_PARAMETER_NOT_PROTECTED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a87c9924e60ccc5de0c8c627925ec3115',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fshort_5fcircuit_5fsig_178',['T_COSE_ERR_SHORT_CIRCUIT_SIG',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a41d3ab8c5e848ecb778f31afa0154b67',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fshort_5fcircuit_5fsig_5fdisabled_179',['T_COSE_ERR_SHORT_CIRCUIT_SIG_DISABLED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97aa9fefad7e9df7cc8667ed740dbd3415d',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsig_5fbuffer_5fsize_180',['T_COSE_ERR_SIG_BUFFER_SIZE',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a1be31366358fbee54e60d2fbb54339e4',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsig_5ffail_181',['T_COSE_ERR_SIG_FAIL',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97acf6ac8e6a5abe5b71ce8b0e2b28de9b4',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsig_5fstruct_182',['T_COSE_ERR_SIG_STRUCT',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a8a37e34cac4caa1ae7386249e23a0e46',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsig_5fverify_183',['T_COSE_ERR_SIG_VERIFY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a5629e71ec5fce4c867421b014481fb22',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fsign1_5fformat_184',['T_COSE_ERR_SIGN1_FORMAT',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a3b506bca4791f5bdeeb46a84d13098a6',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ftampering_5fdetected_185',['T_COSE_ERR_TAMPERING_DETECTED',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a7d5df35f191e8266d36e0d6f67373893',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ftoo_5fmany_5fparameters_186',['T_COSE_ERR_TOO_MANY_PARAMETERS',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97aa2a158c2198a24c1d22ba3706ff8182b',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ftoo_5fmany_5ftags_187',['T_COSE_ERR_TOO_MANY_TAGS',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a77ad5de51192f668baba652222d8b75c',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5ftoo_5fsmall_188',['T_COSE_ERR_TOO_SMALL',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a6944828acdfc4abfea5f73be83c3f60c',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5funknown_5fcritical_5fparameter_189',['T_COSE_ERR_UNKNOWN_CRITICAL_PARAMETER',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a97e707b3428ea321bdeb78a1464b3d4c',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5funknown_5fkey_190',['T_COSE_ERR_UNKNOWN_KEY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97aa911e3edc09368e70a6c479f885c0653',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5funsupported_5fhash_191',['T_COSE_ERR_UNSUPPORTED_HASH',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a23ead60b8042fc626278f6d5b53337fb',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5funsupported_5fsigning_5falg_192',['T_COSE_ERR_UNSUPPORTED_SIGNING_ALG',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a00f60307d04d9ab84e004750ae549907',1,'t_cose_common.h']]], + ['t_5fcose_5ferr_5fwrong_5ftype_5fof_5fkey_193',['T_COSE_ERR_WRONG_TYPE_OF_KEY',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97a16e0fbcd278ad51a8bfbe684d90cf3c8',1,'t_cose_common.h']]], + ['t_5fcose_5fsuccess_194',['T_COSE_SUCCESS',['../t__cose__common_8h.html#a469580b586841b779bbdc430d3a0dd97ae2154f945afa7323af954692b10c87ec',1,'t_cose_common.h']]] +]; diff --git a/search/files_0.html b/search/files_0.html new file mode 100644 index 00000000..9498842a --- /dev/null +++ b/search/files_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_0.js b/search/files_0.js new file mode 100644 index 00000000..27467a11 --- /dev/null +++ b/search/files_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['q_5fuseful_5fbuf_2eh_112',['q_useful_buf.h',['../q__useful__buf_8h.html',1,'']]] +]; diff --git a/search/files_1.html b/search/files_1.html new file mode 100644 index 00000000..7050ef48 --- /dev/null +++ b/search/files_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/files_1.js b/search/files_1.js new file mode 100644 index 00000000..eef6ddaa --- /dev/null +++ b/search/files_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['t_5fcose_5fcommon_2eh_113',['t_cose_common.h',['../t__cose__common_8h.html',1,'']]], + ['t_5fcose_5fsign1_5fsign_2eh_114',['t_cose_sign1_sign.h',['../t__cose__sign1__sign_8h.html',1,'']]], + ['t_5fcose_5fsign1_5fverify_2eh_115',['t_cose_sign1_verify.h',['../t__cose__sign1__verify_8h.html',1,'']]] +]; diff --git a/search/functions_0.html b/search/functions_0.html new file mode 100644 index 00000000..eb4c5014 --- /dev/null +++ b/search/functions_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/functions_0.js b/search/functions_0.js new file mode 100644 index 00000000..0115cdfc --- /dev/null +++ b/search/functions_0.js @@ -0,0 +1,28 @@ +var searchData= +[ + ['t_5fcose_5fis_5falgorithm_5fsupported_116',['t_cose_is_algorithm_supported',['../t__cose__common_8h.html#adba9c7de9edd81e1cec35c8259360f2b',1,'t_cose_common.h']]], + ['t_5fcose_5fsign1_5fencode_5fparameters_117',['t_cose_sign1_encode_parameters',['../t__cose__sign1__sign_8h.html#af73770fd0b41fe8e02b96c3bf1b1ff5b',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fencode_5fparameters_5finternal_118',['t_cose_sign1_encode_parameters_internal',['../t__cose__sign1__sign_8h.html#ad26725f3b777b55c12b591e58486175b',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fencode_5fsignature_119',['t_cose_sign1_encode_signature',['../t__cose__sign1__sign_8h.html#a2fb49347c0e17be027119524b4f87aee',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fencode_5fsignature_5faad_120',['t_cose_sign1_encode_signature_aad',['../t__cose__sign1__sign_8h.html#ae47cd48d67b9c541e8e190ff0e11044b',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fencode_5fsignature_5faad_5finternal_121',['t_cose_sign1_encode_signature_aad_internal',['../t__cose__sign1__sign_8h.html#ae26fa49b789a22073dc8c33011b1b342',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fget_5fnth_5ftag_122',['t_cose_sign1_get_nth_tag',['../t__cose__sign1__verify_8h.html#a8be686d6c16bb92cf6b99c9630f47d07',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fset_5fcontent_5ftype_5ftstr_123',['t_cose_sign1_set_content_type_tstr',['../t__cose__sign1__sign_8h.html#adf844d0f99b8baf6e537bca30bf1dc86',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fset_5fcontent_5ftype_5fuint_124',['t_cose_sign1_set_content_type_uint',['../t__cose__sign1__sign_8h.html#a7dbaf33da0b33b933d017c4c2a194754',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fset_5fsigning_5fkey_125',['t_cose_sign1_set_signing_key',['../t__cose__sign1__sign_8h.html#a0a6ad134b6ec8899bbc00d7f127f8c90',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fset_5fverification_5fkey_126',['t_cose_sign1_set_verification_key',['../t__cose__sign1__verify_8h.html#aaa2559755efcee6aad19cb472dc2461d',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fsign_127',['t_cose_sign1_sign',['../t__cose__sign1__sign_8h.html#a0ef546f0592def62dc6046bad9dccc49',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5faad_128',['t_cose_sign1_sign_aad',['../t__cose__sign1__sign_8h.html#ac10f120452cdfb826ae59c4f06d655e3',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5faad_5finternal_129',['t_cose_sign1_sign_aad_internal',['../t__cose__sign1__sign_8h.html#a17c8eff95f685a4176c557554b8fae75',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5fauxiliary_5fbuffer_5fsize_130',['t_cose_sign1_sign_auxiliary_buffer_size',['../t__cose__sign1__sign_8h.html#aa85ec748b1fe4a76f6d233885e341f52',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5fdetached_131',['t_cose_sign1_sign_detached',['../t__cose__sign1__sign_8h.html#a22824de9715e00a6d68b2ac7e5b59362',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5finit_132',['t_cose_sign1_sign_init',['../t__cose__sign1__sign_8h.html#aae6514c427217c90d4701a38bc4ca6f9',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fsign_5fset_5fauxiliary_5fbuffer_133',['t_cose_sign1_sign_set_auxiliary_buffer',['../t__cose__sign1__sign_8h.html#a8d2fed9b134082635e0d083cbeab6c8d',1,'t_cose_sign1_sign.h']]], + ['t_5fcose_5fsign1_5fverify_134',['t_cose_sign1_verify',['../t__cose__sign1__verify_8h.html#ab14a59bbe3e640de21ea4f8e34abf3c9',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5faad_135',['t_cose_sign1_verify_aad',['../t__cose__sign1__verify_8h.html#abd75fb94e37e3254bb02e7c34134f0b7',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5fauxiliary_5fbuffer_5fsize_136',['t_cose_sign1_verify_auxiliary_buffer_size',['../t__cose__sign1__verify_8h.html#a3a3b69b76f045df2797693e89b08d484',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5fdetached_137',['t_cose_sign1_verify_detached',['../t__cose__sign1__verify_8h.html#a6a70be60718c904dea54596e8e807b69',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5finit_138',['t_cose_sign1_verify_init',['../t__cose__sign1__verify_8h.html#aa17ffa96916517e6ea735f68f654bf55',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5finternal_139',['t_cose_sign1_verify_internal',['../t__cose__sign1__verify_8h.html#ac04166c4f43e9437bdb3a0894ebc933d',1,'t_cose_sign1_verify.h']]], + ['t_5fcose_5fsign1_5fverify_5fset_5fauxiliary_5fbuffer_140',['t_cose_sign1_verify_set_auxiliary_buffer',['../t__cose__sign1__verify_8h.html#ae5e954dddff8f2d6671b90393bf58a35',1,'t_cose_sign1_verify.h']]] +]; diff --git a/search/mag_sel.svg b/search/mag_sel.svg new file mode 100644 index 00000000..03626f64 --- /dev/null +++ b/search/mag_sel.svg @@ -0,0 +1,74 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/search/nomatches.html b/search/nomatches.html new file mode 100644 index 00000000..2b9360b6 --- /dev/null +++ b/search/nomatches.html @@ -0,0 +1,13 @@ + + + + + + + + +
    +
    No Matches
    +
    + + diff --git a/search/search.css b/search/search.css new file mode 100644 index 00000000..9074198f --- /dev/null +++ b/search/search.css @@ -0,0 +1,257 @@ +/*---------------- Search Box */ + +#MSearchBox { + white-space : nowrap; + background: white; + border-radius: 0.65em; + box-shadow: inset 0.5px 0.5px 3px 0px #555; + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + height: 1.4em; + padding: 0 0 0 0.3em; + margin: 0; +} + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 1.1em; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: #909090; + outline: none; + font-family: Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + height: 1.4em; + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: Arial, Verdana, sans-serif; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: Arial, Verdana, sans-serif; +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/search/search.js b/search/search.js new file mode 100644 index 00000000..fb226f73 --- /dev/null +++ b/search/search.js @@ -0,0 +1,816 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches' + this.extension; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline-block'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_0.js b/search/variables_0.js new file mode 100644 index 00000000..dc3c86e0 --- /dev/null +++ b/search/variables_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['auxiliary_5fbuffer_141',['auxiliary_buffer',['../structt__cose__sign1__sign__ctx.html#ab697ed23525f68c9453f1c59683d2fe6',1,'t_cose_sign1_sign_ctx::auxiliary_buffer()'],['../structt__cose__sign1__verify__ctx.html#ab64c2b053b179878106b3e2b633bea78',1,'t_cose_sign1_verify_ctx::auxiliary_buffer()']]] +]; diff --git a/search/variables_1.html b/search/variables_1.html new file mode 100644 index 00000000..ea73d9a4 --- /dev/null +++ b/search/variables_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_1.js b/search/variables_1.js new file mode 100644 index 00000000..c42aa01a --- /dev/null +++ b/search/variables_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['content_5ftype_5ftstr_142',['content_type_tstr',['../structt__cose__parameters.html#af5e34b628abd42b03918d79e232330ba',1,'t_cose_parameters']]], + ['content_5ftype_5fuint_143',['content_type_uint',['../structt__cose__parameters.html#ae4795e9e24ed60d90c08bcbfb955602b',1,'t_cose_parameters']]], + ['cose_5falgorithm_5fid_144',['cose_algorithm_id',['../structt__cose__parameters.html#aaae07443d755c224874972e000dfe716',1,'t_cose_parameters']]], + ['crypto_5flib_145',['crypto_lib',['../structt__cose__key.html#ab33f3c0068eb61732cfb8f0868d2a770',1,'t_cose_key']]] +]; diff --git a/search/variables_2.html b/search/variables_2.html new file mode 100644 index 00000000..0580462e --- /dev/null +++ b/search/variables_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_2.js b/search/variables_2.js new file mode 100644 index 00000000..bd4bf54e --- /dev/null +++ b/search/variables_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['iv_146',['iv',['../structt__cose__parameters.html#a6ae05b0b140d2cd932a539478a825c02',1,'t_cose_parameters']]] +]; diff --git a/search/variables_3.html b/search/variables_3.html new file mode 100644 index 00000000..0d69e761 --- /dev/null +++ b/search/variables_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_3.js b/search/variables_3.js new file mode 100644 index 00000000..2d6e891d --- /dev/null +++ b/search/variables_3.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['key_5fhandle_147',['key_handle',['../structt__cose__key.html#a88cd5054b83b116768dfc0b8d3bc34ec',1,'t_cose_key']]], + ['key_5fptr_148',['key_ptr',['../structt__cose__key.html#aff509e374a6ff6331cbfe33b8640ef5c',1,'t_cose_key']]], + ['kid_149',['kid',['../structt__cose__parameters.html#a9a12c4390359f47cf14f485280cb0007',1,'t_cose_parameters']]] +]; diff --git a/search/variables_4.html b/search/variables_4.html new file mode 100644 index 00000000..a4b6506b --- /dev/null +++ b/search/variables_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/search/variables_4.js b/search/variables_4.js new file mode 100644 index 00000000..1ee25a1a --- /dev/null +++ b/search/variables_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['partial_5fiv_150',['partial_iv',['../structt__cose__parameters.html#ad8a4fa4384065c2e593bfc3d8b0b4a62',1,'t_cose_parameters']]] +]; diff --git a/splitbar.png b/splitbar.png new file mode 100644 index 00000000..fe895f2c Binary files /dev/null and b/splitbar.png differ diff --git a/structt__cose__key.html b/structt__cose__key.html new file mode 100644 index 00000000..40930da5 --- /dev/null +++ b/structt__cose__key.html @@ -0,0 +1,144 @@ + + + + + + + +t_cose: t_cose_key Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    t_cose_key Struct Reference
    +
    +
    + +

    #include <t_cose_common.h>

    + + + + + + + + + + + +

    +Data Fields

    enum t_cose_crypto_lib_t crypto_lib
     
    +union {
       void *   key_ptr
     
       uint64_t   key_handle
     
    k
     
    +

    Detailed Description

    +

    This structure is used to indicate or pass a key through the t_cose implementation to the underlying, platform-specific cryptography libraries for signing and verifying signature. You must know the cryptographic library that is integrated with t_cose to know how to fill in this data structure.

    +

    For example, in the OpenSSL integration, key_ptr should point to an OpenSSL EVP_KEY type.

    +

    Field Documentation

    + +

    ◆ crypto_lib

    + +
    +
    + + + + +
    enum t_cose_crypto_lib_t t_cose_key::crypto_lib
    +
    +

    Identifies the crypto library this key was created for. The crypto library knows if it uses the handle or the pointer so this indirectly selects the union member.

    + +
    +
    + +

    ◆ key_handle

    + +
    +
    + + + + +
    uint64_t t_cose_key::key_handle
    +
    +

    For libraries that use an integer handle to the key

    + +
    +
    + +

    ◆ key_ptr

    + +
    +
    + + + + +
    void* t_cose_key::key_ptr
    +
    +

    For libraries that use a pointer to the key or key handle. NULL indicates empty.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/structt__cose__parameters.html b/structt__cose__parameters.html new file mode 100644 index 00000000..70353658 --- /dev/null +++ b/structt__cose__parameters.html @@ -0,0 +1,191 @@ + + + + + + + +t_cose: t_cose_parameters Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    t_cose_parameters Struct Reference
    +
    +
    + +

    #include <t_cose_sign1_verify.h>

    + + + + + + + + + + + + + + +

    +Data Fields

    int32_t cose_algorithm_id
     
    struct q_useful_buf_c kid
     
    struct q_useful_buf_c iv
     
    struct q_useful_buf_c partial_iv
     
    struct q_useful_buf_c content_type_tstr
     
    uint32_t content_type_uint
     
    +

    Detailed Description

    +

    The result of parsing a set of COSE header parameters. The pointers in this are all back into the COSE_Sign1 blob passed in to t_cose_sign1_verify() as the sign1 parameter.

    +

    Approximate size on a 64-bit machine is 80 bytes and on a 32-bit machine is 40.

    +

    Field Documentation

    + +

    ◆ content_type_tstr

    + +
    +
    + + + + +
    struct q_useful_buf_c t_cose_parameters::content_type_tstr
    +
    +

    The content type as a MIME type like "text/plain". NULL_Q_USEFUL_BUF_C if parameter is not present

    + +
    +
    + +

    ◆ content_type_uint

    + +
    +
    + + + + +
    uint32_t t_cose_parameters::content_type_uint
    +
    +

    The content type as a CoAP Content-Format integer. T_COSE_EMPTY_UINT_CONTENT_TYPE if parameter is not present. Allowed range is 0 to UINT16_MAX per RFC 7252.

    + +
    +
    + +

    ◆ cose_algorithm_id

    + +
    +
    + + + + +
    int32_t t_cose_parameters::cose_algorithm_id
    +
    +

    The algorithm ID. T_COSE_UNSET_ALGORITHM_ID if the algorithm ID parameter is not present. String type algorithm IDs are not supported. See the IANA COSE Registry for the algorithms corresponding to the integer values.

    + +
    +
    + +

    ◆ iv

    + +
    +
    + + + + +
    struct q_useful_buf_c t_cose_parameters::iv
    +
    +

    The initialization vector. NULL_Q_USEFUL_BUF_C if parameter is not present

    + +
    +
    + +

    ◆ kid

    + +
    +
    + + + + +
    struct q_useful_buf_c t_cose_parameters::kid
    +
    +

    The COSE key ID. NULL_Q_USEFUL_BUF_C if parameter is not present

    + +
    +
    + +

    ◆ partial_iv

    + +
    +
    + + + + +
    struct q_useful_buf_c t_cose_parameters::partial_iv
    +
    +

    The partial initialization vector. NULL_Q_USEFUL_BUF_C if parameter is not present

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/structt__cose__sign1__sign__ctx.html b/structt__cose__sign1__sign__ctx.html new file mode 100644 index 00000000..a49976bf --- /dev/null +++ b/structt__cose__sign1__sign__ctx.html @@ -0,0 +1,129 @@ + + + + + + + +t_cose: t_cose_sign1_sign_ctx Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    t_cose_sign1_sign_ctx Struct Reference
    +
    +
    + +

    #include <t_cose_sign1_sign.h>

    + + + + + + + + + + + + + + + + + + + + +

    +Data Fields

    +struct q_useful_buf_c protected_parameters
     
    +int32_t cose_algorithm_id
     
    +struct t_cose_key signing_key
     
    +uint32_t option_flags
     
    +struct q_useful_buf_c kid
     
    +uint32_t content_type_uint
     
    +const char * content_type_tstr
     
    struct q_useful_buf auxiliary_buffer
     
    +size_t auxiliary_buffer_size
     
    +

    Detailed Description

    +

    This is the context for creating a COSE_Sign1 structure. The caller should allocate it and pass it to the functions here. This is about 100 bytes so it fits easily on the stack.

    +

    Field Documentation

    + +

    ◆ auxiliary_buffer

    + +
    +
    + + + + +
    struct q_useful_buf t_cose_sign1_sign_ctx::auxiliary_buffer
    +
    +

    A auxiliary buffer provided by the caller, used to serialize the Sig_Structure. This is only needed when using EdDSA, as otherwise the Sig_Structure is hashed incrementally.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/structt__cose__sign1__verify__ctx.html b/structt__cose__sign1__verify__ctx.html new file mode 100644 index 00000000..af27df1e --- /dev/null +++ b/structt__cose__sign1__verify__ctx.html @@ -0,0 +1,117 @@ + + + + + + + +t_cose: t_cose_sign1_verify_ctx Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    t_cose_sign1_verify_ctx Struct Reference
    +
    +
    + +

    #include <t_cose_sign1_verify.h>

    + + + + + + + + + + + + +

    +Data Fields

    +struct t_cose_key verification_key
     
    +uint32_t option_flags
     
    +uint64_t auTags [T_COSE_MAX_TAGS_TO_RETURN]
     
    struct q_useful_buf auxiliary_buffer
     
    +size_t auxiliary_buffer_size
     
    +

    Detailed Description

    +

    Context for signature verification. It is about 80 bytes on a 64-bit machine and 54 bytes on a 32-bit machine, or less if certain features are disabled.

    +

    Field Documentation

    + +

    ◆ auxiliary_buffer

    + +
    +
    + + + + +
    struct q_useful_buf t_cose_sign1_verify_ctx::auxiliary_buffer
    +
    +

    A auxiliary buffer provided by the caller, used to serialize the Sig_Structure. This is only needed when using EdDSA, as otherwise the Sig_Structure is hashed incrementally.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/sync_off.png b/sync_off.png new file mode 100644 index 00000000..3b443fc6 Binary files /dev/null and b/sync_off.png differ diff --git a/sync_on.png b/sync_on.png new file mode 100644 index 00000000..e08320fb Binary files /dev/null and b/sync_on.png differ diff --git a/t__cose__common_8h.html b/t__cose__common_8h.html new file mode 100644 index 00000000..2f57852b --- /dev/null +++ b/t__cose__common_8h.html @@ -0,0 +1,552 @@ + + + + + + + +t_cose: inc/t_cose/t_cose_common.h File Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    t_cose_common.h File Reference
    +
    +
    + +

    This file contains definitions common to all public t_cose interfaces. +More...

    +
    #include <stdint.h>
    +#include <stdbool.h>
    +
    +

    Go to the source code of this file.

    + + + + +

    +Data Structures

    struct  t_cose_key
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Macros

    #define T_COSE_VERSION_MAJOR   1
     
    +#define T_COSE_VERSION_MINOR   1
     
    +#define T_COSE_VERSION_PATCH   2
     
    #define T_COSE_ALGORITHM_ES256   -7
     Indicates ECDSA with SHA-256. More...
     
    #define T_COSE_ALGORITHM_EDDSA   -8
     Indicates EDDSA, as described by RFC8032. More...
     
    #define T_COSE_ALGORITHM_ES384   -35
     Indicates ECDSA with SHA-384. More...
     
    #define T_COSE_ALGORITHM_ES512   -36
     Indicates ECDSA with SHA-512. More...
     
    #define T_COSE_ALGORITHM_PS256   -37
     Indicates RSASSA-PSS with SHA-256. More...
     
    #define T_COSE_ALGORITHM_PS384   -38
     Indicates RSASSA-PSS with SHA-384. More...
     
    #define T_COSE_ALGORITHM_PS512   -39
     Indicates RSASSA-PSS with SHA-512. More...
     
    #define T_COSE_NULL_KEY    ((struct t_cose_key){T_COSE_CRYPTO_LIB_UNIDENTIFIED, {0}})
     
    +#define T_COSE_SIGN1_MAX_SIZE_PROTECTED_PARAMETERS   (1+1+5+17)
     
    #define T_COSE_PARAMETER_LIST_MAX   10
     
    #define T_COSE_EMPTY_UINT_CONTENT_TYPE   UINT16_MAX+1
     
    + + + + + +

    +Enumerations

    enum  t_cose_crypto_lib_t { T_COSE_CRYPTO_LIB_UNIDENTIFIED = 0 +, T_COSE_CRYPTO_LIB_OPENSSL = 1 +, T_COSE_CRYPTO_LIB_PSA = 2 + }
     
    enum  t_cose_err_t {
    +  T_COSE_SUCCESS = 0 +, T_COSE_ERR_UNSUPPORTED_SIGNING_ALG = 1 +, T_COSE_ERR_MAKING_PROTECTED = 2 +, T_COSE_ERR_UNSUPPORTED_HASH = 3 +,
    +  T_COSE_ERR_HASH_GENERAL_FAIL = 4 +, T_COSE_ERR_HASH_BUFFER_SIZE = 5 +, T_COSE_ERR_SIG_BUFFER_SIZE = 6 +, T_COSE_ERR_SIGN1_FORMAT = 8 +,
    +  T_COSE_ERR_CBOR_NOT_WELL_FORMED = 9 +, T_COSE_ERR_PARAMETER_CBOR = 10 +, T_COSE_ERR_NO_ALG_ID = 11 +, T_COSE_ERR_NO_KID = 12 +,
    +  T_COSE_ERR_SIG_VERIFY = 13 +, T_COSE_ERR_BAD_SHORT_CIRCUIT_KID = 14 +, T_COSE_ERR_INVALID_ARGUMENT = 15 +, T_COSE_ERR_INSUFFICIENT_MEMORY = 16 +,
    +  T_COSE_ERR_FAIL = 17 +, T_COSE_ERR_TAMPERING_DETECTED = 18 +, T_COSE_ERR_UNKNOWN_KEY = 19 +, T_COSE_ERR_WRONG_TYPE_OF_KEY = 20 +,
    +  T_COSE_ERR_SIG_STRUCT = 21 +, T_COSE_ERR_SHORT_CIRCUIT_SIG = 22 +, T_COSE_ERR_SIG_FAIL = 23 +, T_COSE_ERR_CBOR_FORMATTING = 24 +,
    +  T_COSE_ERR_TOO_SMALL = 25 +, T_COSE_ERR_TOO_MANY_PARAMETERS = 26 +, T_COSE_ERR_UNKNOWN_CRITICAL_PARAMETER = 27 +, T_COSE_ERR_SHORT_CIRCUIT_SIG_DISABLED = 28 +,
    +  T_COSE_ERR_INCORRECT_KEY_FOR_LIB = 29 +, T_COSE_ERR_NON_INTEGER_ALG_ID = 30 +, T_COSE_ERR_BAD_CONTENT_TYPE = 31 +, T_COSE_ERR_INCORRECTLY_TAGGED = 32 +,
    +  T_COSE_ERR_EMPTY_KEY = 33 +, T_COSE_ERR_DUPLICATE_PARAMETER = 34 +, T_COSE_ERR_PARAMETER_NOT_PROTECTED = 35 +, T_COSE_ERR_CRIT_PARAMETER = 36 +,
    +  T_COSE_ERR_TOO_MANY_TAGS = 37 +, T_COSE_ERR_NEED_AUXILIARY_BUFFER = 38 +, T_COSE_ERR_AUXILIARY_BUFFER_SIZE = 39 +
    + }
     
    + + + + +

    +Functions

    bool t_cose_is_algorithm_supported (int32_t cose_algorithm_id)
     Check whether an algorithm is supported. More...
     
    +

    Detailed Description

    +

    This file contains definitions common to all public t_cose interfaces.

    +

    t_cose_common.h contains the definitions common to all public t_cose interfaces, particularly the error codes, algorithm identification constants and the structure containing a key.

    +

    Compile Time Configuration Options

    +

    T_COSE_DISABLE_SHORT_CIRCUIT_SIGN – This disables short-circuit signing test mode. This saves a small amount of object code

    +

    T_COSE_DISABLE_ES512 – Disables the COSE algorithm ES512 algorithm. This saves a tiny amount of code and a few hundred bytes of stack. It saves more than T_COSE_DISABLE_ES384.

    +

    T_COSE_DISABLE_ES384 – Disables the COSE algorithm ES384 algorithm. This saves a tiny amount of code and a few hundred bytes of stack. No stack will be saved if T_COSE_DISABLE_ES512 is not also defined.

    +

    T_COSE_DISABLE_PS256 – Disables the COSE algorithm PS256 algorithm.

    +

    T_COSE_DISABLE_PS384 – Disables the COSE algorithm PS384 algorithm.

    +

    T_COSE_DISABLE_PS512 – Disables the COSE algorithm PS512 algorithm.

    +

    T_COSE_DISABLE_CONTENT_TYPE – Disables the content type parameters for both signing and verifying.

    +

    Macro Definition Documentation

    + +

    ◆ T_COSE_ALGORITHM_EDDSA

    + +
    +
    + + + + +
    #define T_COSE_ALGORITHM_EDDSA   -8
    +
    + +

    Indicates EDDSA, as described by RFC8032.

    +

    This value comes from the IANA COSE Registry.

    +

    Keys using either the edwards25519 or edwards448 curves can be used with this algorithm.

    + +
    +
    + +

    ◆ T_COSE_ALGORITHM_ES256

    + +
    +
    + + + + +
    #define T_COSE_ALGORITHM_ES256   -7
    +
    + +

    Indicates ECDSA with SHA-256.

    +

    This value comes from the IANA COSE Registry.

    +

    The COSE standard recommends a key using the secp256r1 curve with this algorithm. This curve is also known as prime256v1 and P-256.

    + +
    +
    + +

    ◆ T_COSE_ALGORITHM_ES384

    + +
    +
    + + + + +
    #define T_COSE_ALGORITHM_ES384   -35
    +
    + +

    Indicates ECDSA with SHA-384.

    +

    This value comes from the IANA COSE Registry.

    +

    The COSE standard recommends a key using the secp384r1 curve with this algorithm. This curve is also known as P-384.

    + +
    +
    + +

    ◆ T_COSE_ALGORITHM_ES512

    + +
    +
    + + + + +
    #define T_COSE_ALGORITHM_ES512   -36
    +
    + +

    Indicates ECDSA with SHA-512.

    +

    This value comes from the IANA COSE Registry.

    +

    The COSE standard recommends a key using the secp521r1 curve with this algorithm. This curve is also known as P-521.

    + +
    +
    + +

    ◆ T_COSE_ALGORITHM_PS256

    + +
    +
    + + + + +
    #define T_COSE_ALGORITHM_PS256   -37
    +
    + +

    Indicates RSASSA-PSS with SHA-256.

    +

    This value comes from the IANA COSE Registry.

    + +
    +
    + +

    ◆ T_COSE_ALGORITHM_PS384

    + +
    +
    + + + + +
    #define T_COSE_ALGORITHM_PS384   -38
    +
    + +

    Indicates RSASSA-PSS with SHA-384.

    +

    This value comes from the IANA COSE Registry.

    + +
    +
    + +

    ◆ T_COSE_ALGORITHM_PS512

    + +
    +
    + + + + +
    #define T_COSE_ALGORITHM_PS512   -39
    +
    + +

    Indicates RSASSA-PSS with SHA-512.

    +

    This value comes from the IANA COSE Registry.

    + +
    +
    + +

    ◆ T_COSE_EMPTY_UINT_CONTENT_TYPE

    + +
    +
    + + + + +
    #define T_COSE_EMPTY_UINT_CONTENT_TYPE   UINT16_MAX+1
    +
    +

    The value of an unsigned integer content type indicating no content type. See t_cose_parameters.

    + +
    +
    + +

    ◆ T_COSE_NULL_KEY

    + +
    +
    + + + + +
    #define T_COSE_NULL_KEY    ((struct t_cose_key){T_COSE_CRYPTO_LIB_UNIDENTIFIED, {0}})
    +
    +

    An empty or NULL t_cose_key

    + +
    +
    + +

    ◆ T_COSE_PARAMETER_LIST_MAX

    + +
    +
    + + + + +
    #define T_COSE_PARAMETER_LIST_MAX   10
    +
    +

    The maximum number of header parameters that can be handled during verification of a COSE_Sign1 message. T_COSE_ERR_TOO_MANY_PARAMETERS will be returned by t_cose_sign1_verify() if the input message has more.

    +

    There can be both T_COSE_PARAMETER_LIST_MAX integer-labeled parameters and T_COSE_PARAMETER_LIST_MAX string-labeled parameters.

    +

    This is a hard maximum so the implementation doesn't need malloc. This constant can be increased if needed. Doing so will increase stack usage.

    + +
    +
    + +

    ◆ T_COSE_VERSION_MAJOR

    + +
    +
    + + + + +
    #define T_COSE_VERSION_MAJOR   1
    +
    +

    Semantic versioning for t_cose x.y.z. Note that these were not defined for some releases of t_cose 1.x so !defined(T_COSE_VERSION_MAJOR) indicates t_cose 1.x.

    + +
    +
    +

    Enumeration Type Documentation

    + +

    ◆ t_cose_crypto_lib_t

    + +
    +
    + + + + +
    enum t_cose_crypto_lib_t
    +
    +

    Indicates the cryptographic library the t_cose_key is intended for. Usually only one cryptographic library is integrated so this serves as a cross-check.

    + + + + +
    Enumerator
    T_COSE_CRYPTO_LIB_UNIDENTIFIED 

    can be used for integrations that don't have or don't want to have any cross-check.

    +
    T_COSE_CRYPTO_LIB_OPENSSL 

    key_ptr points to a malloced OpenSSL EC_KEY. The caller needs to free it after the operation is done.

    +
    T_COSE_CRYPTO_LIB_PSA 

    key_handle is a psa_key_handle_t in Arm's Platform Security Architecture

    +
    + +
    +
    + +

    ◆ t_cose_err_t

    + +
    +
    + + + + +
    enum t_cose_err_t
    +
    +

    Error codes return by t_cose.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Enumerator
    T_COSE_SUCCESS 

    Operation completed successfully.

    +
    T_COSE_ERR_UNSUPPORTED_SIGNING_ALG 

    The requested signing algorithm is not supported.
    +

    +
    T_COSE_ERR_MAKING_PROTECTED 

    Internal error when encoding protected parameters, usually because they are too big. It is internal because the caller can't really affect the size of the protected parameters.

    +
    T_COSE_ERR_UNSUPPORTED_HASH 

    The hash algorithm needed is not supported. Note that the signing algorithm identifier identifies the hash algorithm.

    +
    T_COSE_ERR_HASH_GENERAL_FAIL 

    Some system failure when running the hash algorithm.

    +
    T_COSE_ERR_HASH_BUFFER_SIZE 

    The buffer to receive a hash result is too small.

    +
    T_COSE_ERR_SIG_BUFFER_SIZE 

    The buffer to receive result of a signing operation is too small.

    +
    T_COSE_ERR_SIGN1_FORMAT 

    When verifying a COSE_Sign1, the CBOR is "well-formed", but something is wrong with the format of the CBOR outside of the header parameters. For example, it is missing something like the payload or something is of an unexpected type.

    +
    T_COSE_ERR_CBOR_NOT_WELL_FORMED 

    When decoding some CBOR like a COSE_Sign1, the CBOR was not "well-formed". Most likely what was supposed to be CBOR is either not or is corrupted. The CBOR is can't be decoded.

    +
    T_COSE_ERR_PARAMETER_CBOR 

    The CBOR is "well-formed", but something is wrong with format in the header parameters. For example, a parameter is labeled with other than an integer or string or the value is an integer when a byte string is expected.

    +
    T_COSE_ERR_NO_ALG_ID 

    No algorithm ID was found when one is needed. For example, when verifying a COSE_Sign1.

    +
    T_COSE_ERR_NO_KID 

    No kid (key ID) was found when one is needed. For example, when verifying a COSE_Sign1.

    +
    T_COSE_ERR_SIG_VERIFY 

    Signature verification failed. For example, the cryptographic operations completed successfully but hash wasn't as expected.

    +
    T_COSE_ERR_BAD_SHORT_CIRCUIT_KID 

    Verification of a short-circuit signature failed.

    +
    T_COSE_ERR_INVALID_ARGUMENT 

    Some (unspecified) argument was not valid.

    +
    T_COSE_ERR_INSUFFICIENT_MEMORY 

    Out of heap memory. This originates in crypto library as t_cose does not use malloc.

    +
    T_COSE_ERR_FAIL 

    General unspecific failure.

    +
    T_COSE_ERR_TAMPERING_DETECTED 

    Equivalent to PSA_ERROR_CORRUPTION_DETECTED.

    +
    T_COSE_ERR_UNKNOWN_KEY 

    The key identified by a t_cose_key or a key ID was not found.

    +
    T_COSE_ERR_WRONG_TYPE_OF_KEY 

    The key was found, but it was the wrong type for the operation.

    +
    T_COSE_ERR_SIG_STRUCT 

    Error constructing the COSE Sig_structure when signing or verify.

    +
    T_COSE_ERR_SHORT_CIRCUIT_SIG 

    Signature was short-circuit. The option T_COSE_OPT_ALLOW_SHORT_CIRCUIT to allow verification of short-circuit signatures was not set.
    +

    +
    T_COSE_ERR_SIG_FAIL 

    Something generally went wrong in the crypto adaptor when signing or verifying.

    +
    T_COSE_ERR_CBOR_FORMATTING 

    Something went wrong formatting the CBOR. Possibly the payload has maps or arrays that are not closed when using t_cose_sign1_encode_parameters() and t_cose_sign1_encode_signature() to sign a COSE_Sign1.

    +
    T_COSE_ERR_TOO_SMALL 

    The buffer passed in to receive the output is too small.

    +
    T_COSE_ERR_TOO_MANY_PARAMETERS 

    More parameters (more than T_COSE_PARAMETER_LIST_MAX) than this implementation can handle. Note that all parameters need to be checked for criticality so all parameters need to be examined.

    +
    T_COSE_ERR_UNKNOWN_CRITICAL_PARAMETER 

    A parameter was encountered that was unknown and also listed in the crit labels parameter.

    +
    T_COSE_ERR_SHORT_CIRCUIT_SIG_DISABLED 

    A request was made to signed with a short-circuit sig, T_COSE_OPT_SHORT_CIRCUIT_SIG, but short circuit signature are disabled (compiled out) for this implementation.
    +

    +
    T_COSE_ERR_INCORRECT_KEY_FOR_LIB 

    The key type in a t_cose_key is wrong for the cryptographic library used by this integration of t_cose.

    +
    T_COSE_ERR_NON_INTEGER_ALG_ID 

    This implementation only handles integer COSE algorithm IDs with values less than INT32_MAX.

    +
    T_COSE_ERR_BAD_CONTENT_TYPE 

    The content type parameter contains a content type that is neither integer or text string or it is an integer not in the range of 0 to UINT16_MAX.

    +
    T_COSE_ERR_INCORRECTLY_TAGGED 

    If the option T_COSE_OPT_TAG_REQUIRED is set for t_cose_sign1_verify() and the tag is absent, this error is returned.

    +
    T_COSE_ERR_EMPTY_KEY 

    The signing or verification key given is empty.

    +
    T_COSE_ERR_DUPLICATE_PARAMETER 

    A header parameter occurs twice, perhaps once in protected and once in unprotected. Duplicate header parameters are not allowed in COSE.

    +
    T_COSE_ERR_PARAMETER_NOT_PROTECTED 

    A header parameter that should be protected (alg id or crit) is not. This occurs when verifying a COSE_Sign1 that is improperly constructed.

    +
    T_COSE_ERR_CRIT_PARAMETER 

    Something is wrong with the crit parameter.

    +
    T_COSE_ERR_TOO_MANY_TAGS 

    More than T_COSE_MAX_TAGS_TO_RETURN unprocessed tags when verifying a signature.

    +
    T_COSE_ERR_NEED_AUXILIARY_BUFFER 

    The signature algorithm needs an extra buffer, but none was provided. See t_cose_sign1_verify_set_auxiliary_buffer for more details.

    +
    T_COSE_ERR_AUXILIARY_BUFFER_SIZE 

    The auxiliary buffer is too small

    +
    + +
    +
    +

    Function Documentation

    + +

    ◆ t_cose_is_algorithm_supported()

    + +
    +
    + + + + + + + + +
    bool t_cose_is_algorithm_supported (int32_t cose_algorithm_id)
    +
    + +

    Check whether an algorithm is supported.

    +
    Parameters
    + + +
    [in]cose_algorithm_idCOSE Integer algorithm ID.
    +
    +
    +
    Returns
    true if algorithm is supported, false if not.
    +

    Algorithms identifiers are from COSE algorithm registry: https://www.iana.org/assignments/cose/cose.xhtml#algorithms

    +

    A primary use for this is to determine whether or not to run a test case. It is often unneccessary for regular use, because all the APIs will return T_COSE_ERR_UNSUPPORTED_XXXX if the algorithm is not supported.

    + +
    +
    +
    + + + + diff --git a/t__cose__common_8h_source.html b/t__cose__common_8h_source.html new file mode 100644 index 00000000..aeb03699 --- /dev/null +++ b/t__cose__common_8h_source.html @@ -0,0 +1,332 @@ + + + + + + + +t_cose: inc/t_cose/t_cose_common.h Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    t_cose_common.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  * t_cose_common.h
    +
    3  *
    +
    4  * Copyright 2019-2024, Laurence Lundblade
    +
    5  *
    +
    6  * SPDX-License-Identifier: BSD-3-Clause
    +
    7  *
    +
    8  * See BSD-3-Clause license in README.md
    +
    9  */
    +
    10 
    +
    11 
    +
    12 #ifndef __T_COSE_COMMON_H__
    +
    13 #define __T_COSE_COMMON_H__
    +
    14 
    +
    15 #include <stdint.h>
    +
    16 #include <stdbool.h>
    +
    17 
    +
    18 #ifdef __cplusplus
    +
    19 extern "C" {
    +
    20 #endif
    +
    21 
    +
    22 
    +
    23 
    +
    67 #define T_COSE_VERSION_MAJOR 1
    +
    68 #define T_COSE_VERSION_MINOR 1
    +
    69 #define T_COSE_VERSION_PATCH 2
    +
    70 
    +
    71 
    +
    83 #define T_COSE_ALGORITHM_ES256 -7
    +
    84 
    +
    96 #define T_COSE_ALGORITHM_EDDSA -8
    +
    97 
    +
    109 #define T_COSE_ALGORITHM_ES384 -35
    +
    110 
    +
    122 #define T_COSE_ALGORITHM_ES512 -36
    +
    123 
    +
    132 #define T_COSE_ALGORITHM_PS256 -37
    +
    133 
    +
    142 #define T_COSE_ALGORITHM_PS384 -38
    +
    143 
    +
    152 #define T_COSE_ALGORITHM_PS512 -39
    +
    153 
    +
    154 
    +
    155 
    +
    156 
    + + + + +
    173 };
    +
    174 
    +
    175 
    +
    186 struct t_cose_key {
    + +
    191  union {
    +
    194  void *key_ptr;
    +
    196  uint64_t key_handle;
    +
    197  } k;
    +
    198 };
    +
    199 
    +
    200 
    +
    202 /*
    +
    203  * This has to be definied differently in C than C++ because there is
    +
    204  * no common construct for a literal structure.
    +
    205  *
    +
    206  * In C compound literals are used.
    +
    207  *
    +
    208  * In C++ list initalization is used. This only works
    +
    209  * in C++11 and later.
    +
    210  *
    +
    211  * Note that some popular C++ compilers can handle compound
    +
    212  * literals with on-by-default extensions, however
    +
    213  * this code aims for full correctness with strict
    +
    214  * compilers so they are not used.
    +
    215  */
    +
    216 #ifdef __cplusplus
    +
    217 #define T_COSE_NULL_KEY {T_COSE_CRYPTO_LIB_UNIDENTIFIED, {0}}
    +
    218 #else
    +
    219 #define T_COSE_NULL_KEY \
    +
    220  ((struct t_cose_key){T_COSE_CRYPTO_LIB_UNIDENTIFIED, {0}})
    +
    221 #endif
    +
    222 
    +
    223 
    +
    224 /* Private value. Intentionally not documented for Doxygen. This is
    +
    225  * the size allocated for the encoded protected header parameters. It
    +
    226  * needs to be big enough for encode_protected_parameters() to
    +
    227  * succeed. It currently sized for one parameter with an algorithm ID
    +
    228  * up to 32 bits long -- one byte for the wrapping map, one byte for
    +
    229  * the label, 5 bytes for the ID. If this is made accidentally too
    +
    230  * small, QCBOR will only return an error, and not overrun any
    +
    231  * buffers.
    +
    232  *
    +
    233  * 17 extra bytes are added, rounding it up to 24 total, in case some
    +
    234  * other protected header parameter is to be added and so the test
    +
    235  * using T_COSE_TEST_CRIT_PARAMETER_EXIST can work.
    +
    236  */
    +
    237 #define T_COSE_SIGN1_MAX_SIZE_PROTECTED_PARAMETERS (1+1+5+17)
    +
    238 
    +
    239 
    +
    243 /*
    +
    244  * Do not reorder these. It is OK to add new ones at the end.
    +
    245  *
    +
    246  * Explicit values are included because some tools like debuggers show
    +
    247  * only the value, not the symbol, and it is hard to count up through
    +
    248  * 35 lines to figure out the actual value.
    +
    249  */
    + + +
    253 
    + +
    256 
    + +
    261 
    + +
    265 
    + +
    268 
    + +
    271 
    + +
    275 
    + +
    281 
    + +
    286 
    + +
    292 
    + +
    296 
    + +
    300 
    + +
    305 
    + +
    308 
    + +
    311 
    + +
    315 
    + +
    318 
    + +
    321 
    + +
    325 
    + +
    329 
    + +
    333 
    + +
    338 
    + +
    342 
    + +
    348 
    + +
    351 
    + +
    357 
    + +
    361 
    + +
    366 
    + +
    371 
    + +
    375 
    + +
    380 
    + +
    385 
    + +
    388 
    + +
    394 
    + +
    399 
    + +
    402 
    + +
    406 
    + +
    411 
    + +
    414 };
    +
    415 
    +
    416 
    +
    417 
    +
    418 
    +
    433 #define T_COSE_PARAMETER_LIST_MAX 10
    +
    434 
    +
    435 
    +
    436 
    +
    441 #define T_COSE_EMPTY_UINT_CONTENT_TYPE UINT16_MAX+1
    +
    442 
    +
    457 bool
    +
    458 t_cose_is_algorithm_supported(int32_t cose_algorithm_id);
    +
    459 
    +
    460 
    +
    461 #ifdef __cplusplus
    +
    462 }
    +
    463 #endif
    +
    464 
    +
    465 
    +
    466 #endif /* __T_COSE_COMMON_H__ */
    +
    Definition: t_cose_common.h:186
    +
    uint64_t key_handle
    Definition: t_cose_common.h:196
    +
    enum t_cose_crypto_lib_t crypto_lib
    Definition: t_cose_common.h:190
    +
    void * key_ptr
    Definition: t_cose_common.h:194
    +
    t_cose_crypto_lib_t
    Definition: t_cose_common.h:162
    +
    @ T_COSE_CRYPTO_LIB_PSA
    Definition: t_cose_common.h:172
    +
    @ T_COSE_CRYPTO_LIB_OPENSSL
    Definition: t_cose_common.h:169
    +
    @ T_COSE_CRYPTO_LIB_UNIDENTIFIED
    Definition: t_cose_common.h:166
    +
    t_cose_err_t
    Definition: t_cose_common.h:250
    +
    @ T_COSE_ERR_UNSUPPORTED_SIGNING_ALG
    Definition: t_cose_common.h:255
    +
    @ T_COSE_ERR_INSUFFICIENT_MEMORY
    Definition: t_cose_common.h:314
    +
    @ T_COSE_ERR_CRIT_PARAMETER
    Definition: t_cose_common.h:401
    +
    @ T_COSE_ERR_WRONG_TYPE_OF_KEY
    Definition: t_cose_common.h:328
    +
    @ T_COSE_ERR_SIG_BUFFER_SIZE
    Definition: t_cose_common.h:274
    +
    @ T_COSE_ERR_NO_KID
    Definition: t_cose_common.h:299
    +
    @ T_COSE_ERR_UNSUPPORTED_HASH
    Definition: t_cose_common.h:264
    +
    @ T_COSE_ERR_INCORRECT_KEY_FOR_LIB
    Definition: t_cose_common.h:370
    +
    @ T_COSE_ERR_HASH_GENERAL_FAIL
    Definition: t_cose_common.h:267
    +
    @ T_COSE_ERR_CBOR_NOT_WELL_FORMED
    Definition: t_cose_common.h:285
    +
    @ T_COSE_ERR_SIGN1_FORMAT
    Definition: t_cose_common.h:280
    +
    @ T_COSE_ERR_SHORT_CIRCUIT_SIG
    Definition: t_cose_common.h:337
    +
    @ T_COSE_ERR_NEED_AUXILIARY_BUFFER
    Definition: t_cose_common.h:410
    +
    @ T_COSE_ERR_CBOR_FORMATTING
    Definition: t_cose_common.h:347
    +
    @ T_COSE_ERR_SIG_VERIFY
    Definition: t_cose_common.h:304
    +
    @ T_COSE_ERR_BAD_SHORT_CIRCUIT_KID
    Definition: t_cose_common.h:307
    +
    @ T_COSE_ERR_TOO_SMALL
    Definition: t_cose_common.h:350
    +
    @ T_COSE_ERR_BAD_CONTENT_TYPE
    Definition: t_cose_common.h:379
    +
    @ T_COSE_ERR_NON_INTEGER_ALG_ID
    Definition: t_cose_common.h:374
    +
    @ T_COSE_ERR_TOO_MANY_TAGS
    Definition: t_cose_common.h:405
    +
    @ T_COSE_ERR_INCORRECTLY_TAGGED
    Definition: t_cose_common.h:384
    +
    @ T_COSE_ERR_TAMPERING_DETECTED
    Definition: t_cose_common.h:320
    +
    @ T_COSE_ERR_PARAMETER_NOT_PROTECTED
    Definition: t_cose_common.h:398
    +
    @ T_COSE_ERR_SIG_STRUCT
    Definition: t_cose_common.h:332
    +
    @ T_COSE_ERR_DUPLICATE_PARAMETER
    Definition: t_cose_common.h:393
    +
    @ T_COSE_ERR_UNKNOWN_CRITICAL_PARAMETER
    Definition: t_cose_common.h:360
    +
    @ T_COSE_ERR_HASH_BUFFER_SIZE
    Definition: t_cose_common.h:270
    +
    @ T_COSE_ERR_TOO_MANY_PARAMETERS
    Definition: t_cose_common.h:356
    +
    @ T_COSE_ERR_UNKNOWN_KEY
    Definition: t_cose_common.h:324
    +
    @ T_COSE_ERR_SHORT_CIRCUIT_SIG_DISABLED
    Definition: t_cose_common.h:365
    +
    @ T_COSE_ERR_PARAMETER_CBOR
    Definition: t_cose_common.h:291
    +
    @ T_COSE_ERR_INVALID_ARGUMENT
    Definition: t_cose_common.h:310
    +
    @ T_COSE_ERR_FAIL
    Definition: t_cose_common.h:317
    +
    @ T_COSE_ERR_SIG_FAIL
    Definition: t_cose_common.h:341
    +
    @ T_COSE_ERR_MAKING_PROTECTED
    Definition: t_cose_common.h:260
    +
    @ T_COSE_SUCCESS
    Definition: t_cose_common.h:252
    +
    @ T_COSE_ERR_NO_ALG_ID
    Definition: t_cose_common.h:295
    +
    @ T_COSE_ERR_AUXILIARY_BUFFER_SIZE
    Definition: t_cose_common.h:413
    +
    @ T_COSE_ERR_EMPTY_KEY
    Definition: t_cose_common.h:387
    +
    bool t_cose_is_algorithm_supported(int32_t cose_algorithm_id)
    Check whether an algorithm is supported.
    +
    + + + + diff --git a/t__cose__sign1__sign_8h.html b/t__cose__sign1__sign_8h.html new file mode 100644 index 00000000..c8a8ce91 --- /dev/null +++ b/t__cose__sign1__sign_8h.html @@ -0,0 +1,1014 @@ + + + + + + + +t_cose: inc/t_cose/t_cose_sign1_sign.h File Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    t_cose_sign1_sign.h File Reference
    +
    +
    + +

    Create a COSE_Sign1 message, such as for EAT or CWT Token. +More...

    +
    #include <stdint.h>
    +#include <stdbool.h>
    +#include "qcbor/qcbor.h"
    +#include "t_cose/q_useful_buf.h"
    +#include "t_cose/t_cose_common.h"
    +
    +

    Go to the source code of this file.

    + + + + +

    +Data Structures

    struct  t_cose_sign1_sign_ctx
     
    + + + + + +

    +Macros

    #define T_COSE_OPT_SHORT_CIRCUIT_SIG   0x00000001
     
    #define T_COSE_OPT_OMIT_CBOR_TAG   0x00000002
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    static void t_cose_sign1_sign_init (struct t_cose_sign1_sign_ctx *context, uint32_t option_flags, int32_t cose_algorithm_id)
     Initialize to start creating a COSE_Sign1. More...
     
    static void t_cose_sign1_set_signing_key (struct t_cose_sign1_sign_ctx *context, struct t_cose_key signing_key, struct q_useful_buf_c kid)
     Set the key and kid (key ID) for signing. More...
     
    static void t_cose_sign1_sign_set_auxiliary_buffer (struct t_cose_sign1_sign_ctx *context, struct q_useful_buf auxiliary_buffer)
     Configure an auxiliary buffer used to serialize the Sig_Structure. More...
     
    static size_t t_cose_sign1_sign_auxiliary_buffer_size (struct t_cose_sign1_sign_ctx *context)
     Get the required auxiliary buffer size for the most recent signing operation. More...
     
    static void t_cose_sign1_set_content_type_uint (struct t_cose_sign1_sign_ctx *context, uint16_t content_type)
     Set the payload content type using CoAP content types. More...
     
    static void t_cose_sign1_set_content_type_tstr (struct t_cose_sign1_sign_ctx *context, const char *content_type)
     Set the payload content type using MIME content types. More...
     
    static enum t_cose_err_t t_cose_sign1_sign (struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c payload, struct q_useful_buf out_buf, struct q_useful_buf_c *result)
     Create and sign a COSE_Sign1 message with a payload in one call. More...
     
    static enum t_cose_err_t t_cose_sign1_sign_aad (struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c aad, struct q_useful_buf_c payload, struct q_useful_buf out_buf, struct q_useful_buf_c *result)
     Create and sign a COSE_Sign1 message with a payload in one call. More...
     
    static enum t_cose_err_t t_cose_sign1_sign_detached (struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c aad, struct q_useful_buf_c detached_payload, struct q_useful_buf out_buf, struct q_useful_buf_c *result)
     Create and sign a COSE_Sign1 message with detached payload in one call. More...
     
    static enum t_cose_err_t t_cose_sign1_encode_parameters (struct t_cose_sign1_sign_ctx *context, QCBOREncodeContext *cbor_encode_ctx)
     Output first part and parameters for a COSE_Sign1 message. More...
     
    static enum t_cose_err_t t_cose_sign1_encode_signature (struct t_cose_sign1_sign_ctx *context, QCBOREncodeContext *cbor_encode_ctx)
     Finish a COSE_Sign1 message by outputting the signature. More...
     
    static enum t_cose_err_t t_cose_sign1_encode_signature_aad (struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c aad, QCBOREncodeContext *cbor_encode_ctx)
     Finish a COSE_Sign1 message with AAD by outputting the signature. More...
     
    enum t_cose_err_t t_cose_sign1_encode_parameters_internal (struct t_cose_sign1_sign_ctx *context, bool payload_is_detached, QCBOREncodeContext *cbor_encode_ctx)
     Semi-private function that ouputs the COSE parameters, startng a COSE_Sign1 message. More...
     
    enum t_cose_err_t t_cose_sign1_encode_signature_aad_internal (struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c aad, struct q_useful_buf_c detached_payload, QCBOREncodeContext *cbor_encode_ctx)
     Semi-private function that ouputs the signature, finishing a COSE_Sign1 message. More...
     
    enum t_cose_err_t t_cose_sign1_sign_aad_internal (struct t_cose_sign1_sign_ctx *context, bool payload_is_detached, struct q_useful_buf_c aad, struct q_useful_buf_c payload, struct q_useful_buf out_buf, struct q_useful_buf_c *result)
     Semi-private function that does a complete signing in one call. More...
     
    +

    Detailed Description

    +

    Create a COSE_Sign1 message, such as for EAT or CWT Token.

    +

    This creates a COSE_Sign1 message in compliance with COSE (RFC 8152). A COSE_Sign1 message is a CBOR encoded binary blob that contains header parameters, a payload and a signature. Usually the signature is made with an EC signing algorithm like ECDSA.

    +

    This implementation is intended to be small and portable to different OS's and platforms. Its dependencies are:

      +
    • QCBOR
    • +
    • <stdint.h>, <string.h>, <stddef.h>
    • +
    • Hash functions like SHA-256
    • +
    • Signing functions like ECDSA
    • +
    +

    There is a cryptographic adaptation layer defined in t_cose_crypto.h. An implementation can be made of the functions in it for different cryptographic libraries. This means that different integrations with different cryptographic libraries may support only signing with a particular set of algorithms. Integration with OpenSSL is supported. Key ID look up also varies by different cryptographic library integrations.

    +

    This implementation has a mode where a CBOR-format payload can be output directly into the output buffer. This saves having two copies of the payload in memory. For this mode use t_cose_sign1_encode_parameters() and t_cose_sign1_encode_signature(). For a simpler API that just takes the payload as an input buffer use t_cose_sign1_sign().

    +

    See t_cose_common.h for preprocessor defines to reduce object code and stack use by disabling features.

    +

    Macro Definition Documentation

    + +

    ◆ T_COSE_OPT_OMIT_CBOR_TAG

    + +
    +
    + + + + +
    #define T_COSE_OPT_OMIT_CBOR_TAG   0x00000002
    +
    +

    An option_flag for t_cose_sign1_sign_init() to not add the CBOR type 6 tag for COSE_Sign1 whose value is 18. Some uses of COSE may require this tag be absent because it is known that it is a COSE_Sign1 from surrounding context.

    +

    Or said another way, per the COSE RFC, this code produces a COSE_Sign1_Tagged by default and a COSE_Sign1 when this flag is set. The only difference between these two is the CBOR tag.

    + +
    +
    + +

    ◆ T_COSE_OPT_SHORT_CIRCUIT_SIG

    + +
    +
    + + + + +
    #define T_COSE_OPT_SHORT_CIRCUIT_SIG   0x00000001
    +
    +

    This selects a signing test mode called short circuit signing. This mode is useful when there is no signing key available, perhaps because it has not been provisioned or configured for the particular device. It may also be because the public key cryptographic functions have not been connected up in the cryptographic adaptation layer.

    +

    It has no value for security at all. Data signed this way MUST NOT be trusted as anyone can sign like this.

    +

    In this mode, the signature is the hash of that which would normally be signed by the public key algorithm. To make the signature the correct size for the particular algorithm, instances of the hash are concatenated to pad it out.

    +

    This mode is very useful for testing because all the code except the actual signing algorithm is run exactly as it would if a proper signing algorithm was run. This can be used for end-end system testing all the way to a server or relying party, not just for testing device code as t_cose_sign1_verify() supports it too.

    + +
    +
    +

    Function Documentation

    + +

    ◆ t_cose_sign1_encode_parameters()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_encode_parameters (struct t_cose_sign1_sign_ctxcontext,
    QCBOREncodeContext * cbor_encode_ctx 
    )
    +
    +inlinestatic
    +
    + +

    Output first part and parameters for a COSE_Sign1 message.

    +
    Parameters
    + + + +
    [in]contextThe t_cose signing context.
    [in]cbor_encode_ctxEncoding context to output to.
    +
    +
    +

    This is the more complex and more memory efficient alternative to t_cose_sign1_sign(). Like t_cose_sign1_sign(), t_cose_sign1_sign_init() and t_cose_sign1_set_signing_key() must be called before calling this.

    +

    When this is called, the opening parts of the COSE_Sign1 message are output to the cbor_encode_ctx.

    +

    After this is called, the CBOR-formatted payload must be written to the cbor_encode_ctx by calling all the various QCBOREncode_AddXxx calls. It can be as simple or complex as needed.

    +

    To complete the COSE_Sign1 call t_cose_sign1_encode_signature().

    +

    The cbor_encode_ctx must have been initialized with an output buffer to hold the COSE_Sign1 header parameters, the payload and the signature.

    +

    This and t_cose_sign1_encode_signature() can be used to calculate the size of the COSE_Sign1 in the way QCBOREncode is usually used to calculate sizes. In this case the t_cose_sign1_ctx must be initialized with the options, algorithm, key and kid just as normal as these are needed to calculate the size. Then set up the output buffer for cbor_encode_ctx with a NULL pointer and large length like UINT32_MAX. Call t_cose_sign1_encode_parameters(), then format the payload into the encoder context, then call t_cose_sign1_encode_signature(). Finally call QCBOREncode_FinishGetSize() to get the length.

    + +
    +
    + +

    ◆ t_cose_sign1_encode_parameters_internal()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    enum t_cose_err_t t_cose_sign1_encode_parameters_internal (struct t_cose_sign1_sign_ctxcontext,
    bool payload_is_detached,
    QCBOREncodeContext * cbor_encode_ctx 
    )
    +
    + +

    Semi-private function that ouputs the COSE parameters, startng a COSE_Sign1 message.

    +
    Parameters
    + + + + +
    [in]contextThe t_cose signing context.
    [in]payload_is_detachedIf the payload is to be detached, this is true.
    [in]cbor_encode_ctxEncoding context to output to.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    This does the actual work for encoding the COSE parameters, but is a private function inside the implementation. Call t_cose_sign1_encode_parameters() instead of this.

    + +
    +
    + +

    ◆ t_cose_sign1_encode_signature()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_encode_signature (struct t_cose_sign1_sign_ctxcontext,
    QCBOREncodeContext * cbor_encode_ctx 
    )
    +
    +inlinestatic
    +
    + +

    Finish a COSE_Sign1 message by outputting the signature.

    +
    Parameters
    + + + +
    [in]contextThe t_cose signing context.
    [in]cbor_encode_ctxEncoding context to output to.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    Call this to complete creation of a signed COSE_Sign1 started with t_cose_sign1_encode_parameters().

    +

    This is when the cryptographic signature algorithm is run.

    +

    The completed COSE_Sign1 message is retrieved from the cbor_encode_ctx by calling QCBOREncode_Finish().

    + +
    +
    + +

    ◆ t_cose_sign1_encode_signature_aad()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_encode_signature_aad (struct t_cose_sign1_sign_ctxcontext,
    struct q_useful_buf_c aad,
    QCBOREncodeContext * cbor_encode_ctx 
    )
    +
    +inlinestatic
    +
    + +

    Finish a COSE_Sign1 message with AAD by outputting the signature.

    +
    Parameters
    + + + + +
    [in]contextThe t_cose signing context.
    [in]aadThe Additional Authenticated Data.
    [in]cbor_encode_ctxEncoding context to output to.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    This is the same as t_cose_sign1_encode_signature() and it allows passing in AAD (Additional Authenticated Data) to be covered by the signature.

    +

    AAD is simply any data that should also be covered by the signature. The verifier of the COSE_Sign1 must also have exactly this data to be able to successfully verify the signature. Often this data is some parameters or fields in the protocol carrying the COSE message.

    + +
    +
    + +

    ◆ t_cose_sign1_encode_signature_aad_internal()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    enum t_cose_err_t t_cose_sign1_encode_signature_aad_internal (struct t_cose_sign1_sign_ctxcontext,
    struct q_useful_buf_c aad,
    struct q_useful_buf_c detached_payload,
    QCBOREncodeContext * cbor_encode_ctx 
    )
    +
    + +

    Semi-private function that ouputs the signature, finishing a COSE_Sign1 message.

    +
    Parameters
    + + + + + +
    [in]contextThe t_cose signing context.
    [in]aadThe Additional Authenticated Data or NULL_Q_USEFUL_BUF_C.
    [in]detached_payloadThe detached payload or NULL_Q_USEFUL_BUF_C.
    [in]cbor_encode_ctxEncoding context to output to.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    This does the actual work for several public methods that output a signature. It is internal to the implmentation and t_cose_sign1_encode_signature_aad() should be called instead.

    +

    If detached_payload is NULL_Q_USEFUL_BUF_C then the payload is to be inline and must have been added by calls to QCBOREncode after the call to t_cose_sign1_encode_parameters().

    + +
    +
    + +

    ◆ t_cose_sign1_set_content_type_tstr()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static void t_cose_sign1_set_content_type_tstr (struct t_cose_sign1_sign_ctxcontext,
    const char * content_type 
    )
    +
    +inlinestatic
    +
    + +

    Set the payload content type using MIME content types.

    +
    Parameters
    + + + +
    [in]contextThe t_cose signing context.
    [in]content_typeThe content type of the payload as defined in the IANA Media Types registry.
    +
    +
    +

    It is not allowed to have both a CoAP and MIME content type. This error will show up when t_cose_sign1_sign() or t_cose_sign1_encode_parameters() is called.

    +

    The IANA Media Types registry can be found here. These have been known as MIME types in the past.

    + +
    +
    + +

    ◆ t_cose_sign1_set_content_type_uint()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static void t_cose_sign1_set_content_type_uint (struct t_cose_sign1_sign_ctxcontext,
    uint16_t content_type 
    )
    +
    +inlinestatic
    +
    + +

    Set the payload content type using CoAP content types.

    +
    Parameters
    + + + +
    [in]contextThe t_cose signing context.
    [in]content_typeThe content type of the payload as defined in the IANA CoAP Content-Formats registry.
    +
    +
    +

    It is not allowed to have both a CoAP and MIME content type. This error will show up when t_cose_sign1_sign() or t_cose_sign1_encode_parameters() is called as no error is returned by this function.

    +

    The IANA CoAP Content-Formats registry is found here.

    + +
    +
    + +

    ◆ t_cose_sign1_set_signing_key()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static void t_cose_sign1_set_signing_key (struct t_cose_sign1_sign_ctxcontext,
    struct t_cose_key signing_key,
    struct q_useful_buf_c kid 
    )
    +
    +inlinestatic
    +
    + +

    Set the key and kid (key ID) for signing.

    +
    Parameters
    + + + + +
    [in]contextThe t_cose signing context.
    [in]signing_keyThe signing key to use or T_COSE_NULL_KEY.
    [in]kidCOSE kid (key ID) parameter or NULL_Q_USEFUL_BUF_C.
    +
    +
    +

    This needs to be called to set the signing key to use. The kid may be omitted by giving NULL_Q_USEFUL_BUF_C.

    +

    If short-circuit signing is used, T_COSE_OPT_SHORT_CIRCUIT_SIG, then this does not need to be called. If it is called the kid given will be used, but the signing_key is never used. When the kid is given with a short-circuit signature, the internally fixed kid for short circuit will not be used and this COSE_Sign1 message can not be verified by t_cose_sign1_verify().

    + +
    +
    + +

    ◆ t_cose_sign1_sign()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_sign (struct t_cose_sign1_sign_ctxcontext,
    struct q_useful_buf_c payload,
    struct q_useful_buf out_buf,
    struct q_useful_buf_c * result 
    )
    +
    +inlinestatic
    +
    + +

    Create and sign a COSE_Sign1 message with a payload in one call.

    +
    Parameters
    + + + + + +
    [in]contextThe t_cose signing context.
    [in]payloadPointer and length of payload to sign.
    [in]out_bufPointer and length of buffer to output to.
    [out]resultPointer and length of the resulting COSE_Sign1.
    +
    +
    +

    The context must have been initialized with t_cose_sign1_sign_init() and the key set with t_cose_sign1_set_signing_key() before this is called.

    +

    This creates the COSE header parameter, hashes and signs the payload and creates the signature all in one go. out_buf gives the pointer and length of the memory into which the output is written. The pointer and length of the completed COSE_Sign1 is returned in result. (out_buf and result are used instead of the usual in/out parameter for length because it is the convention for q_useful_buf and is more const correct.)

    +

    The size of out_buf must be the size of the payload plus overhead for formating, the signature and the key id (if used). The formatting overhead is minimal at about 30 bytes.The total overhead is about 150 bytes for ECDSA 256 with a 32-byte key ID.

    +

    To compute the size of the buffer needed before it is allocated call this with out_buf containing a NULL pointer and large length like UINT32_MAX. The algorithm and key, kid and such must be set up just as if the real COSE_Sign1 were to be created as these values are needed to compute the size correctly. The contents of result will be a NULL pointer and the length of the COSE_Sign1. When this is run like this, the cryptographic functions will not actually run, but the size of their output will be taken into account to give an exact size.

    +

    This function requires the payload be complete and formatted in a contiguous buffer. The resulting COSE_Sign1 message also contains the payload preceded by the header parameters and followed by the signature, all CBOR formatted. This function thus requires two copies of the payload to be in memory. Alternatively t_cose_sign1_encode_parameters() and t_cose_sign1_encode_signature() can be used. They are more complex to use, but avoid the two copies of the payload and can reduce memory requirements by close to half.

    +

    See also t_cose_sign1_sign_aad() and t_cose_sign1_sign_detached().

    + +
    +
    + +

    ◆ t_cose_sign1_sign_aad()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_sign_aad (struct t_cose_sign1_sign_ctxcontext,
    struct q_useful_buf_c aad,
    struct q_useful_buf_c payload,
    struct q_useful_buf out_buf,
    struct q_useful_buf_c * result 
    )
    +
    +inlinestatic
    +
    + +

    Create and sign a COSE_Sign1 message with a payload in one call.

    +
    Parameters
    + + + + + + +
    [in]contextThe t_cose signing context.
    [in]aadThe Additional Authenticated Data or NULL_Q_USEFUL_BUF_C.
    [in]payloadPointer and length of payload to sign.
    [in]out_bufPointer and length of buffer to output to.
    [out]resultPointer and length of the resulting COSE_Sign1.
    +
    +
    +

    This is the same as t_cose_sign1_sign() additionally allowing AAD. AAD (Additional Authenticated Data) is extra bytes to be covered by the signature. See t_cose_sign1_encode_signature_aad() for more details about AAD.

    +

    Calling this with aad as NULL_Q_USEFUL_BUF_C is equivalent to t_cose_sign1_sign().

    +

    See also t_cose_sign1_sign_detached().

    + +
    +
    + +

    ◆ t_cose_sign1_sign_aad_internal()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    enum t_cose_err_t t_cose_sign1_sign_aad_internal (struct t_cose_sign1_sign_ctxcontext,
    bool payload_is_detached,
    struct q_useful_buf_c aad,
    struct q_useful_buf_c payload,
    struct q_useful_buf out_buf,
    struct q_useful_buf_c * result 
    )
    +
    + +

    Semi-private function that does a complete signing in one call.

    +
    Parameters
    + + + + + + + +
    [in]contextThe t_cose signing context.
    [in]payload_is_detachedIf true, then payload is detached.
    [in]payloadThe payload, inline or detached.
    [in]aadThe Additional Authenticated Data or NULL_Q_USEFUL_BUF_C.
    [in]out_bufPointer and length of buffer to output to.
    [out]resultPointer and length of the resulting COSE_Sign1.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    This is where the work actually gets done for signing that is done all in one call with or without AAD and for included or detached payloads.

    +

    This is a private function internal to the implementation. Call t_cose_sign1_sign_aad() instead of this.

    + +
    +
    + +

    ◆ t_cose_sign1_sign_auxiliary_buffer_size()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static size_t t_cose_sign1_sign_auxiliary_buffer_size (struct t_cose_sign1_sign_ctxcontext)
    +
    +inlinestatic
    +
    + +

    Get the required auxiliary buffer size for the most recent signing operation.

    +
    Parameters
    + + +
    [in]contextThe t_cose signing context.
    +
    +
    +
    Returns
    The number of bytes of auxiliary buffer used by the most recent signing operation.
    +

    This function can be called after t_cose_sign1_sign (or equivalent) was called. If a NULL output buffer was passed to the signing function (to operate in size calculation mode), this returns the number of bytes that would have been used by the signing operation. This allows the caller to allocate an appropriately sized buffer before performing the actual verification.

    +

    This function returns if the signature algorithm used does not need an auxiliary buffer.

    + +
    +
    + +

    ◆ t_cose_sign1_sign_detached()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_sign_detached (struct t_cose_sign1_sign_ctxcontext,
    struct q_useful_buf_c aad,
    struct q_useful_buf_c detached_payload,
    struct q_useful_buf out_buf,
    struct q_useful_buf_c * result 
    )
    +
    +inlinestatic
    +
    + +

    Create and sign a COSE_Sign1 message with detached payload in one call.

    +
    Parameters
    + + + + + + +
    [in]contextThe t_cose signing context.
    [in]aadThe Additional Authenticated Data or NULL_Q_USEFUL_BUF_C.
    [in]detached_payloadPointer and length of the detached payload to sign.
    [in]out_bufPointer and length of buffer to output to.
    [out]resultPointer and length of the resulting COSE_Sign1.
    +
    +
    +

    This is similar to, but not the same as t_cose_sign1_sign_aad(). Here the payload is detached, not inside the COSE_Sign1 and conveyed separately. The signature is still over the payload as with t_cose_sign1_sign_aad(). They payload must conveyed to recipient by some other means than by being inside the COSE_Sign1. The recipient will be unable to verify the COSE_Sign1 without it.

    +

    This may be called with aad as NULL_Q_USEFUL_BUF_C if there is no AAD.

    + +
    +
    + +

    ◆ t_cose_sign1_sign_init()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    static void t_cose_sign1_sign_init (struct t_cose_sign1_sign_ctxcontext,
    uint32_t option_flags,
    int32_t cose_algorithm_id 
    )
    +
    +inlinestatic
    +
    + +

    Initialize to start creating a COSE_Sign1.

    +
    Parameters
    + + + + +
    [in]contextThe t_cose signing context.
    [in]option_flagsOne of T_COSE_OPT_XXXX.
    [in]cose_algorithm_idThe algorithm to sign with, for example T_COSE_ALGORITHM_ES256.
    +
    +
    +

    Initialize the t_cose_sign1_sign_ctx context. Typically, no option_flags are needed and 0 can be passed. A cose_algorithm_id must always be given. See T_COSE_OPT_SHORT_CIRCUIT_SIG and related for possible option flags.

    +

    The algorithm ID space is from COSE (RFC8152) and the IANA COSE Registry. T_COSE_ALGORITHM_ES256 and a few others are defined here for convenience. The signing algorithms supported depends on the cryptographic library that t_cose is integrated with.

    +

    Errors such as the passing of an unsupported cose_algorithm_id are reported when t_cose_sign1_sign() or t_cose_sign1_encode_parameters() is called.

    + +
    +
    + +

    ◆ t_cose_sign1_sign_set_auxiliary_buffer()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static void t_cose_sign1_sign_set_auxiliary_buffer (struct t_cose_sign1_sign_ctxcontext,
    struct q_useful_buf auxiliary_buffer 
    )
    +
    +inlinestatic
    +
    + +

    Configure an auxiliary buffer used to serialize the Sig_Structure.

    +
    Parameters
    + + + +
    [in]contextThe t_cose signing context.
    [in]auxiliary_bufferThe buffer used to serialize the Sig_Structure.
    +
    +
    +

    Some signature algorithms (namely EdDSA), require two passes over their input. In order to achieve this, the library needs to serialize a temporary to-be-signed structure into an auxiliary buffer. This function allows the user to configure such a buffer.

    +

    The buffer must be big enough to accomodate the Sig_Structure type, which is roughly the sum of sizes of the encoded protected parameters, aad and payload, along with a few dozen bytes of overhead.

    +

    To compute the exact size needed, an auxiliary buffer with a NULL pointer and a large size, such as UINT32_MAX, can be used. No actual signing will take place, but the auxiliary buffer will be shrunk to the to expected size.

    + +
    +
    +
    + + + + diff --git a/t__cose__sign1__sign_8h_source.html b/t__cose__sign1__sign_8h_source.html new file mode 100644 index 00000000..1ee4163b --- /dev/null +++ b/t__cose__sign1__sign_8h_source.html @@ -0,0 +1,413 @@ + + + + + + + +t_cose: inc/t_cose/t_cose_sign1_sign.h Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    t_cose_sign1_sign.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  * t_cose_sign1_sign.h
    +
    3  *
    +
    4  * Copyright (c) 2018-2021, Laurence Lundblade. All rights reserved.
    +
    5  * Copyright (c) 2020, Michael Eckel
    +
    6  *
    +
    7  * SPDX-License-Identifier: BSD-3-Clause
    +
    8  *
    +
    9  * See BSD-3-Clause license in README.md
    +
    10  */
    +
    11 
    +
    12 #ifndef __T_COSE_SIGN1_H__
    +
    13 #define __T_COSE_SIGN1_H__
    +
    14 
    +
    15 #include <stdint.h>
    +
    16 #include <stdbool.h>
    +
    17 #include "qcbor/qcbor.h"
    +
    18 #include "t_cose/q_useful_buf.h"
    +
    19 #include "t_cose/t_cose_common.h"
    +
    20 
    +
    21 #ifdef __cplusplus
    +
    22 extern "C" {
    +
    23 #endif
    +
    24 
    +
    25 
    + +
    70  /* Private data structure */
    +
    71  struct q_useful_buf_c protected_parameters; /* Encoded protected paramssy */
    +
    72  int32_t cose_algorithm_id;
    +
    73  struct t_cose_key signing_key;
    +
    74  uint32_t option_flags;
    +
    75  struct q_useful_buf_c kid;
    +
    76 #ifndef T_COSE_DISABLE_CONTENT_TYPE
    +
    77  uint32_t content_type_uint;
    +
    78  const char * content_type_tstr;
    +
    79 #endif
    +
    80 
    +
    81 #ifndef T_COSE_DISABLE_EDDSA
    +
    87  struct q_useful_buf auxiliary_buffer;
    +
    88 
    +
    89  /* The size of the serialized Sig_Structure used in the last
    +
    90  * signing operation. This can be used by the user to determine
    +
    91  * a suitable auxiliary buffer size.
    +
    92  */
    +
    93  size_t auxiliary_buffer_size;
    +
    94 #endif
    +
    95 };
    +
    96 
    +
    97 
    +
    120 #define T_COSE_OPT_SHORT_CIRCUIT_SIG 0x00000001
    +
    121 
    +
    122 
    +
    133 #define T_COSE_OPT_OMIT_CBOR_TAG 0x00000002
    +
    134 
    +
    135 
    +
    160 static void
    + +
    162  uint32_t option_flags,
    +
    163  int32_t cose_algorithm_id);
    +
    164 
    +
    165 
    +
    184 static void
    + +
    186  struct t_cose_key signing_key,
    +
    187  struct q_useful_buf_c kid);
    +
    188 
    +
    210 static void
    + +
    212  struct q_useful_buf auxiliary_buffer);
    +
    213 
    +
    233 static size_t
    + +
    235 
    +
    236 
    +
    237 
    +
    238 #ifndef T_COSE_DISABLE_CONTENT_TYPE
    +
    254 static inline void
    + +
    256  uint16_t content_type);
    +
    257 
    +
    274 static inline void
    + +
    276  const char *content_type);
    +
    277 #endif /* T_COSE_DISABLE_CONTENT_TYPE */
    +
    278 
    +
    279 
    +
    280 
    +
    328 static enum t_cose_err_t
    + +
    330  struct q_useful_buf_c payload,
    +
    331  struct q_useful_buf out_buf,
    +
    332  struct q_useful_buf_c *result);
    +
    333 
    +
    334 
    +
    354 static enum t_cose_err_t
    + +
    356  struct q_useful_buf_c aad,
    +
    357  struct q_useful_buf_c payload,
    +
    358  struct q_useful_buf out_buf,
    +
    359  struct q_useful_buf_c *result);
    +
    360 
    +
    361 
    +
    382 static enum t_cose_err_t
    + +
    384  struct q_useful_buf_c aad,
    +
    385  struct q_useful_buf_c detached_payload,
    +
    386  struct q_useful_buf out_buf,
    +
    387  struct q_useful_buf_c *result);
    +
    388 
    +
    389 
    +
    390 
    +
    426 static enum t_cose_err_t
    + +
    428  QCBOREncodeContext *cbor_encode_ctx);
    +
    429 
    +
    430 
    +
    447 static enum t_cose_err_t
    + +
    449  QCBOREncodeContext *cbor_encode_ctx);
    +
    450 
    +
    451 
    +
    471 static inline enum t_cose_err_t
    + +
    473  struct q_useful_buf_c aad,
    +
    474  QCBOREncodeContext *cbor_encode_ctx);
    +
    475 
    +
    476 
    +
    477 
    +
    478 
    +
    479 
    +
    480 
    +
    481 /* ------------------------------------------------------------------------
    +
    482  * Inline implementations of public functions defined above.
    +
    483  */
    +
    484 static inline void
    + +
    486  uint32_t option_flags,
    +
    487  int32_t cose_algorithm_id)
    +
    488 {
    +
    489  memset(me, 0, sizeof(*me));
    +
    490 #ifndef T_COSE_DISABLE_CONTENT_TYPE
    +
    491  me->content_type_uint = T_COSE_EMPTY_UINT_CONTENT_TYPE;
    +
    492 #endif
    +
    493 
    +
    494  me->cose_algorithm_id = cose_algorithm_id;
    +
    495  me->option_flags = option_flags;
    +
    496 
    +
    497 #ifndef T_COSE_DISABLE_EDDSA
    +
    498  /* Start with large (but NULL) auxiliary buffer. If EdDSA is used,
    +
    499  * the Sig_Structure data will be serialized here.
    +
    500  */
    +
    501  me->auxiliary_buffer.len = SIZE_MAX;
    +
    502 #endif
    +
    503 }
    +
    504 
    +
    505 
    +
    506 static inline void
    + +
    508  struct t_cose_key signing_key,
    +
    509  struct q_useful_buf_c kid)
    +
    510 {
    +
    511  me->kid = kid;
    +
    512  me->signing_key = signing_key;
    +
    513 }
    +
    514 
    +
    515 static inline void
    + +
    517  struct q_useful_buf auxiliary_buffer)
    +
    518 {
    +
    519 #ifndef T_COSE_DISABLE_EDDSA
    +
    520  me->auxiliary_buffer = auxiliary_buffer;
    +
    521 #else
    +
    522  (void)me;
    +
    523  (void)auxiliary_buffer;
    +
    524 #endif
    +
    525 }
    +
    526 
    +
    527 static inline size_t
    + +
    529 {
    +
    530 #ifndef T_COSE_DISABLE_EDDSA
    +
    531  return me->auxiliary_buffer_size;
    +
    532 #else
    +
    533  /* If EdDSA is disabled we don't ever need an auxiliary buffer. */
    +
    534  (void)me;
    +
    535  return 0;
    +
    536 #endif
    +
    537 }
    +
    538 
    +
    539 
    +
    555 enum t_cose_err_t
    + +
    557  bool payload_is_detached,
    +
    558  QCBOREncodeContext *cbor_encode_ctx);
    +
    559 
    +
    560 
    +
    561 static inline enum t_cose_err_t
    + +
    563  QCBOREncodeContext *cbor_encode_ctx)
    +
    564 {
    + +
    566  false,
    +
    567  cbor_encode_ctx);
    +
    568 }
    +
    569 
    +
    570 
    +
    591 enum t_cose_err_t
    + +
    593  struct q_useful_buf_c aad,
    +
    594  struct q_useful_buf_c detached_payload,
    +
    595  QCBOREncodeContext *cbor_encode_ctx);
    +
    596 
    +
    618 enum t_cose_err_t
    + +
    620  bool payload_is_detached,
    +
    621  struct q_useful_buf_c aad,
    +
    622  struct q_useful_buf_c payload,
    +
    623  struct q_useful_buf out_buf,
    +
    624  struct q_useful_buf_c *result);
    +
    625 
    +
    626 
    +
    627 static inline enum t_cose_err_t
    + +
    629  struct q_useful_buf_c aad,
    +
    630  struct q_useful_buf_c payload,
    +
    631  struct q_useful_buf out_buf,
    +
    632  struct q_useful_buf_c *result)
    +
    633 {
    + +
    635  false,
    +
    636  aad,
    +
    637  payload,
    +
    638  out_buf,
    +
    639  result);
    +
    640 }
    +
    641 
    +
    642 
    +
    643 static inline enum t_cose_err_t
    + +
    645  struct q_useful_buf_c payload,
    +
    646  struct q_useful_buf out_buf,
    +
    647  struct q_useful_buf_c *result)
    +
    648 {
    + +
    650  false,
    +
    651  payload,
    +
    652  NULL_Q_USEFUL_BUF_C,
    +
    653  out_buf,
    +
    654  result);
    +
    655 }
    +
    656 
    +
    657 
    +
    658 static inline enum t_cose_err_t
    + +
    660  struct q_useful_buf_c aad,
    +
    661  struct q_useful_buf_c detached_payload,
    +
    662  struct q_useful_buf out_buf,
    +
    663  struct q_useful_buf_c *result)
    +
    664 {
    + +
    666  true,
    +
    667  detached_payload,
    +
    668  aad,
    +
    669  out_buf,
    +
    670  result);
    +
    671 }
    +
    672 
    +
    673 
    +
    674 static inline enum t_cose_err_t
    + +
    676  struct q_useful_buf_c aad,
    +
    677  QCBOREncodeContext *cbor_encode_ctx)
    +
    678 {
    + +
    680  aad,
    +
    681  NULL_Q_USEFUL_BUF_C,
    +
    682  cbor_encode_ctx);
    +
    683 }
    +
    684 
    +
    685 
    +
    686 static inline enum t_cose_err_t
    + +
    688  QCBOREncodeContext *cbor_encode_ctx)
    +
    689 {
    + +
    691  NULL_Q_USEFUL_BUF_C,
    +
    692  NULL_Q_USEFUL_BUF_C,
    +
    693  cbor_encode_ctx);
    +
    694 }
    +
    695 
    +
    696 
    +
    697 #ifndef T_COSE_DISABLE_CONTENT_TYPE
    +
    698 static inline void
    + +
    700  uint16_t content_type)
    +
    701 {
    +
    702  me->content_type_uint = content_type;
    +
    703 }
    +
    704 
    +
    705 
    +
    706 static inline void
    + +
    708  const char *content_type)
    +
    709 {
    +
    710  me->content_type_tstr = content_type;
    +
    711 }
    +
    712 #endif
    +
    713 
    +
    714 #ifdef __cplusplus
    +
    715 }
    +
    716 #endif
    +
    717 
    +
    718 #endif /* __T_COSE_SIGN1_H__ */
    +
    This is a TF-M coding style version of UsefulBuf. See UsefulBuf for documentation of these functions.
    +
    Definition: t_cose_common.h:186
    +
    Definition: t_cose_sign1_sign.h:69
    +
    struct q_useful_buf auxiliary_buffer
    Definition: t_cose_sign1_sign.h:87
    +
    This file contains definitions common to all public t_cose interfaces.
    +
    t_cose_err_t
    Definition: t_cose_common.h:250
    +
    #define T_COSE_EMPTY_UINT_CONTENT_TYPE
    Definition: t_cose_common.h:441
    +
    static void t_cose_sign1_set_signing_key(struct t_cose_sign1_sign_ctx *context, struct t_cose_key signing_key, struct q_useful_buf_c kid)
    Set the key and kid (key ID) for signing.
    Definition: t_cose_sign1_sign.h:507
    +
    static enum t_cose_err_t t_cose_sign1_sign(struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c payload, struct q_useful_buf out_buf, struct q_useful_buf_c *result)
    Create and sign a COSE_Sign1 message with a payload in one call.
    Definition: t_cose_sign1_sign.h:644
    +
    enum t_cose_err_t t_cose_sign1_sign_aad_internal(struct t_cose_sign1_sign_ctx *context, bool payload_is_detached, struct q_useful_buf_c aad, struct q_useful_buf_c payload, struct q_useful_buf out_buf, struct q_useful_buf_c *result)
    Semi-private function that does a complete signing in one call.
    +
    static enum t_cose_err_t t_cose_sign1_sign_detached(struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c aad, struct q_useful_buf_c detached_payload, struct q_useful_buf out_buf, struct q_useful_buf_c *result)
    Create and sign a COSE_Sign1 message with detached payload in one call.
    Definition: t_cose_sign1_sign.h:659
    +
    static enum t_cose_err_t t_cose_sign1_encode_signature(struct t_cose_sign1_sign_ctx *context, QCBOREncodeContext *cbor_encode_ctx)
    Finish a COSE_Sign1 message by outputting the signature.
    Definition: t_cose_sign1_sign.h:687
    +
    static void t_cose_sign1_set_content_type_uint(struct t_cose_sign1_sign_ctx *context, uint16_t content_type)
    Set the payload content type using CoAP content types.
    Definition: t_cose_sign1_sign.h:699
    +
    static void t_cose_sign1_sign_set_auxiliary_buffer(struct t_cose_sign1_sign_ctx *context, struct q_useful_buf auxiliary_buffer)
    Configure an auxiliary buffer used to serialize the Sig_Structure.
    Definition: t_cose_sign1_sign.h:516
    +
    static size_t t_cose_sign1_sign_auxiliary_buffer_size(struct t_cose_sign1_sign_ctx *context)
    Get the required auxiliary buffer size for the most recent signing operation.
    Definition: t_cose_sign1_sign.h:528
    +
    static void t_cose_sign1_sign_init(struct t_cose_sign1_sign_ctx *context, uint32_t option_flags, int32_t cose_algorithm_id)
    Initialize to start creating a COSE_Sign1.
    Definition: t_cose_sign1_sign.h:485
    +
    static enum t_cose_err_t t_cose_sign1_sign_aad(struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c aad, struct q_useful_buf_c payload, struct q_useful_buf out_buf, struct q_useful_buf_c *result)
    Create and sign a COSE_Sign1 message with a payload in one call.
    Definition: t_cose_sign1_sign.h:628
    +
    enum t_cose_err_t t_cose_sign1_encode_parameters_internal(struct t_cose_sign1_sign_ctx *context, bool payload_is_detached, QCBOREncodeContext *cbor_encode_ctx)
    Semi-private function that ouputs the COSE parameters, startng a COSE_Sign1 message.
    +
    static void t_cose_sign1_set_content_type_tstr(struct t_cose_sign1_sign_ctx *context, const char *content_type)
    Set the payload content type using MIME content types.
    Definition: t_cose_sign1_sign.h:707
    +
    enum t_cose_err_t t_cose_sign1_encode_signature_aad_internal(struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c aad, struct q_useful_buf_c detached_payload, QCBOREncodeContext *cbor_encode_ctx)
    Semi-private function that ouputs the signature, finishing a COSE_Sign1 message.
    +
    static enum t_cose_err_t t_cose_sign1_encode_signature_aad(struct t_cose_sign1_sign_ctx *context, struct q_useful_buf_c aad, QCBOREncodeContext *cbor_encode_ctx)
    Finish a COSE_Sign1 message with AAD by outputting the signature.
    Definition: t_cose_sign1_sign.h:675
    +
    static enum t_cose_err_t t_cose_sign1_encode_parameters(struct t_cose_sign1_sign_ctx *context, QCBOREncodeContext *cbor_encode_ctx)
    Output first part and parameters for a COSE_Sign1 message.
    Definition: t_cose_sign1_sign.h:562
    +
    + + + + diff --git a/t__cose__sign1__verify_8h.html b/t__cose__sign1__verify_8h.html new file mode 100644 index 00000000..5bbb7409 --- /dev/null +++ b/t__cose__sign1__verify_8h.html @@ -0,0 +1,807 @@ + + + + + + + +t_cose: inc/t_cose/t_cose_sign1_verify.h File Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    + +
    +
    t_cose_sign1_verify.h File Reference
    +
    +
    + +

    Verify a COSE_Sign1 Message. +More...

    +
    #include <stdint.h>
    +#include <stdbool.h>
    +#include "t_cose/q_useful_buf.h"
    +#include "t_cose/t_cose_common.h"
    +#include "qcbor/qcbor_common.h"
    +
    +

    Go to the source code of this file.

    + + + + + + +

    +Data Structures

    struct  t_cose_parameters
     
    struct  t_cose_sign1_verify_ctx
     
    + + + + + + + + + + + + + + + + + +

    +Macros

    #define T_COSE_UNSET_ALGORITHM_ID   0
     
    #define T_COSE_OPT_ALLOW_SHORT_CIRCUIT   0x00000001
     
    #define T_COSE_OPT_REQUIRE_KID   0x00000002
     
    #define T_COSE_OPT_TAG_REQUIRED   0x00000004
     
    #define T_COSE_OPT_TAG_PROHIBITED   0x00000010
     
    #define T_COSE_OPT_DECODE_ONLY   0x00000008
     
    #define T_COSE_OPT_UNKNOWN_CRIT_ALLOWED   0x00000020
     
    #define T_COSE_MAX_TAGS_TO_RETURN   4
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    static void t_cose_sign1_verify_init (struct t_cose_sign1_verify_ctx *context, uint32_t option_flags)
     Initialize for COSE_Sign1 message verification. More...
     
    static void t_cose_sign1_set_verification_key (struct t_cose_sign1_verify_ctx *context, struct t_cose_key verification_key)
     Set key for COSE_Sign1 message verification. More...
     
    static void t_cose_sign1_verify_set_auxiliary_buffer (struct t_cose_sign1_verify_ctx *context, struct q_useful_buf auxiliary_buffer)
     Configure a buffer used to serialize the Sig_Structure. More...
     
    static size_t t_cose_sign1_verify_auxiliary_buffer_size (struct t_cose_sign1_verify_ctx *context)
     Get the required auxiliary buffer size for the most recent verification operation. More...
     
    static enum t_cose_err_t t_cose_sign1_verify (struct t_cose_sign1_verify_ctx *context, struct q_useful_buf_c sign1, struct q_useful_buf_c *payload, struct t_cose_parameters *parameters)
     Verify a COSE_Sign1. More...
     
    static enum t_cose_err_t t_cose_sign1_verify_aad (struct t_cose_sign1_verify_ctx *context, struct q_useful_buf_c sign1, struct q_useful_buf_c aad, struct q_useful_buf_c *payload, struct t_cose_parameters *parameters)
     Verify a COSE_Sign1 with Additional Authenticated Data. More...
     
    static enum t_cose_err_t t_cose_sign1_verify_detached (struct t_cose_sign1_verify_ctx *context, struct q_useful_buf_c cose_sign1, struct q_useful_buf_c aad, struct q_useful_buf_c detached_payload, struct t_cose_parameters *parameters)
     Verify a COSE_Sign1 with detached payload. More...
     
    static uint64_t t_cose_sign1_get_nth_tag (const struct t_cose_sign1_verify_ctx *context, size_t n)
     Return unprocessed tags from most recent signature verify. More...
     
    enum t_cose_err_t t_cose_sign1_verify_internal (struct t_cose_sign1_verify_ctx *me, struct q_useful_buf_c sign1, struct q_useful_buf_c aad, struct q_useful_buf_c *payload, struct t_cose_parameters *parameters, bool is_detached)
     Semi-private function to verify a COSE_Sign1. More...
     
    +

    Detailed Description

    +

    Verify a COSE_Sign1 Message.

    +

    This verifies a COSE_Sign1 message in compliance with COSE (RFC 8152). A COSE_Sign1 message is a CBOR encoded binary blob that contains header parameters, a payload and a signature. Usually the signature is made with an EC signing algorithm like ECDSA.

    +

    This implementation is intended to be small and portable to different OS's and platforms. Its dependencies are:

      +
    • QCBOR
    • +
    • <stdint.h>, <string.h>, <stddef.h>
    • +
    • Hash functions like SHA-256
    • +
    • Signing functions like ECDSA
    • +
    +

    There is a cryptographic adaptation layer defined in t_cose_crypto.h. An implementation can be made of the functions in it for different cryptographic libraries. This means that different integrations with different cryptographic libraries may support only signing with a particular set of algorithms. Integration with OpenSSL is supported. Key ID look up also varies by different cryptographic library integrations.

    +

    See t_cose_common.h for preprocessor defines to reduce object code and stack use by disabling features.

    +

    Macro Definition Documentation

    + +

    ◆ T_COSE_MAX_TAGS_TO_RETURN

    + +
    +
    + + + + +
    #define T_COSE_MAX_TAGS_TO_RETURN   4
    +
    +

    The maximum number of unprocessed tags that can be returned by t_cose_sign1_get_nth_tag(). The CWT tag is an example of the tags that might returned. The COSE tags that are processed, don't count here.

    + +
    +
    + +

    ◆ T_COSE_OPT_ALLOW_SHORT_CIRCUIT

    + +
    +
    + + + + +
    #define T_COSE_OPT_ALLOW_SHORT_CIRCUIT   0x00000001
    +
    +

    Pass this as option_flags to allow verification of short-circuit signatures. This should only be used as a test mode as short-circuit signatures are not secure.

    +

    See also T_COSE_OPT_SHORT_CIRCUIT_SIG.

    + +
    +
    + +

    ◆ T_COSE_OPT_DECODE_ONLY

    + +
    +
    + + + + +
    #define T_COSE_OPT_DECODE_ONLY   0x00000008
    +
    +

    See t_cose_sign1_set_verification_key().

    +

    This option disables cryptographic signature verification. With this option the verification_key is not needed. This is useful to decode the COSE_Sign1 message to get the kid (key ID). The verification key can be looked up or otherwise obtained by the caller. Once the key in in hand, t_cose_sign1_verify() can be called again to perform the full verification.

    +

    The payload will always be returned whether this is option is given or not, but it should not be considered secure when this option is given.

    + +
    +
    + +

    ◆ T_COSE_OPT_REQUIRE_KID

    + +
    +
    + + + + +
    #define T_COSE_OPT_REQUIRE_KID   0x00000002
    +
    +

    The error T_COSE_ERR_NO_KID is returned if the kid parameter is missing. Note that the kid parameter is primarily passed on to the crypto layer so the crypto layer can look up the key. If the verification key is determined by other than the kid, then it is fine if there is no kid.

    + +
    +
    + +

    ◆ T_COSE_OPT_TAG_PROHIBITED

    + +
    +
    + + + + +
    #define T_COSE_OPT_TAG_PROHIBITED   0x00000010
    +
    +

    Normally this will decode the CBOR presented as a COSE_Sign1 message whether it is tagged using QCBOR tagging as such or not. If this option is set, then T_COSE_ERR_INCORRECTLY_TAGGED is returned if a CBOR_TAG_COSE_SIGN1 tag. When this option is set the caller knows for certain that a COSE signed message is expected.

    +

    See discussion on T_COSE_OPT_TAG_REQUIRED.

    + +
    +
    + +

    ◆ T_COSE_OPT_TAG_REQUIRED

    + +
    +
    + + + + +
    #define T_COSE_OPT_TAG_REQUIRED   0x00000004
    +
    +

    Normally this will decode the CBOR presented as a COSE_Sign1 message whether it is tagged using QCBOR tagging as such or not. If this option is set, then T_COSE_ERR_INCORRECTLY_TAGGED is returned if it is not a CBOR_TAG_COSE_SIGN1 tag.

    +

    See also T_COSE_OPT_TAG_PROHIBITED. If neither this or T_COSE_OPT_TAG_PROHIBITED is set then the content can either be COSE message (COSE_Sign1 CDDL from RFC 8152) or a COSESign1 tagg (COSE_Sign1_Tagged from RFC 8152).

    +

    See t_cose_sign1_get_nth_tag() to get further tags that enclose the COSE message.

    + +
    +
    + +

    ◆ T_COSE_OPT_UNKNOWN_CRIT_ALLOWED

    + +
    +
    + + + + +
    #define T_COSE_OPT_UNKNOWN_CRIT_ALLOWED   0x00000020
    +
    +

    This option disables verification that critical header parameters are known.

    +

    Without this flag set, an error is raised during verification if there is an unknown header parameter in the critical header parameters list. However, if this flag is set then that part of verification is skipped.

    + +
    +
    + +

    ◆ T_COSE_UNSET_ALGORITHM_ID

    + +
    +
    + + + + +
    #define T_COSE_UNSET_ALGORITHM_ID   0
    +
    +

    A special COSE algorithm ID that indicates no COSE algorithm ID or an unset COSE algorithm ID.

    + +
    +
    +

    Function Documentation

    + +

    ◆ t_cose_sign1_get_nth_tag()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static uint64_t t_cose_sign1_get_nth_tag (const struct t_cose_sign1_verify_ctxcontext,
    size_t n 
    )
    +
    +inlinestatic
    +
    + +

    Return unprocessed tags from most recent signature verify.

    +
    Parameters
    + + + +
    [in]contextThe t_cose signature verification context.
    [in]nIndex of the tag to return.
    +
    +
    +
    Returns
    The tag value or CBOR_TAG_INVALID64 if there is no tag at the index or the index is too large.
    +

    The 0th tag is the one for which the COSE message is the content. Loop from 0 up until CBOR_TAG_INVALID64 is returned. The maximum is T_COSE_MAX_TAGS_TO_RETURN.

    +

    It will be necessary to call this for a general implementation of a CWT since sometimes the CWT tag is required. This is also needed for recursive processing of nested COSE signing and/or encryption.

    + +
    +
    + +

    ◆ t_cose_sign1_set_verification_key()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static void t_cose_sign1_set_verification_key (struct t_cose_sign1_verify_ctxcontext,
    struct t_cose_key verification_key 
    )
    +
    +inlinestatic
    +
    + +

    Set key for COSE_Sign1 message verification.

    +
    Parameters
    + + + +
    [in,out]contextThe t_cose signature verification context.
    [in]verification_keyThe verification key to use.
    +
    +
    +

    There are four ways that the verification key is found and supplied to t_cose so that t_cose_sign1_verify() succeeds.

    +
      +
    1. Look up by kid parameter and set by t_cose_sign1_set_verification_key()
    2. +
    3. Look up by other and set by t_cose_sign1_set_verification_key()
    4. +
    5. Determination by kid that short circuit signing is used (test only)
    6. +
    7. Look up by kid parameter in cryptographic adaptation layer
    8. +
    +

    Note that there is no means where certificates, like X.509 certificates, are provided in the COSE parameters. Perhaps there will be in the future but that is not in common use or supported by this implementation.

    +

    To use 1, it is necessary to call t_cose_sign1_verify_init() and t_cose_sign1_verify() twice. The first time t_cose_sign1_verify_init() is called, give the T_COSE_OPT_DECODE_ONLY option. Then call t_cose_sign1_verify() and the kid will be returned in parameters. The caller finds the kid on their own. Then call this to set the key. Last call t_cose_sign1_verify(), again without the T_COSE_OPT_DECODE_ONLY option.

    +

    To use 2, the key is somehow determined without the kid and t_cose_sign1_set_verification_key() is called with it. Then t_cose_sign1_verify() is called. Note that this implementation cannot return non-standard header parameters, at least not yet.

    +

    To use 3, initialize with T_COSE_OPT_ALLOW_SHORT_CIRCUIT. No call to t_cose_sign1_set_verification_key() is necessary. If you do call t_cose_sign1_set_verification_key(), the kid for short circuit signing will be recognized and the set key will be ignored.

    +

    To use 4, first be sure that the cryptographic adapter supports look up by kid. There's no API to determine this, so it is probably determined by other system documentation (aka source code). In this mode, all that is necessary is to call t_cose_sign1_verify().

    +

    3 always works no matter what is done in the cryptographic adaptation layer because it never calls out to it. The OpenSSL adaptor supports 1 and 2.

    + +
    +
    + +

    ◆ t_cose_sign1_verify()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_verify (struct t_cose_sign1_verify_ctxcontext,
    struct q_useful_buf_c sign1,
    struct q_useful_buf_c * payload,
    struct t_cose_parametersparameters 
    )
    +
    +inlinestatic
    +
    + +

    Verify a COSE_Sign1.

    +
    Parameters
    + + + + + +
    [in,out]contextThe t_cose signature verification context.
    [in]sign1Pointer and length of CBOR encoded COSE_Sign1 message that is to be verified.
    [out]payloadPointer and length of the payload.
    [out]parametersPlace to return parsed parameters. May be NULL.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    See t_cose_sign1_set_verification_key() for discussion on where the verification key comes from.

    +

    Verification involves the following steps.

    +
      +
    • The CBOR-format COSE_Sign1 structure is parsed. This makes sure COSE_Sign1 is valid CBOR and follows the required structure for COSE_Sign1.
    • +
    • The protected header parameters are decoded, particular the algorithm id.
    • +
    • The unprotected headers parameters are decoded, particularly the kid.
    • +
    • The payload is identified. The internals of the payload are not decoded.
    • +
    • The expected hash, the "to-be-signed" bytes are computed. The hash algorithm used comes from the signing algorithm. If the algorithm is unknown or not supported this will error out.
    • +
    • Finally, the signature verification is performed.
    • +
    +

    If verification is successful, the pointer to the CBOR-encoded payload is returned. The parameters are returned if requested. All pointers returned are to memory in the sign1 passed in.

    +

    Note that this only handles standard COSE header parameters. There are no facilities for custom header parameters, even though they are allowed by the COSE standard.

    +

    This will recognize the special key ID for short-circuit signing and verify it if the T_COSE_OPT_ALLOW_SHORT_CIRCUIT is set.

    +

    Indefinite length CBOR strings are not supported by this implementation. T_COSE_ERR_SIGN1_FORMAT will be returned if they are in the input COSE_Sign1 messages. For example, if the payload is an indefinite-length byte string, this error will be returned.

    + +
    +
    + +

    ◆ t_cose_sign1_verify_aad()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_verify_aad (struct t_cose_sign1_verify_ctxcontext,
    struct q_useful_buf_c sign1,
    struct q_useful_buf_c aad,
    struct q_useful_buf_c * payload,
    struct t_cose_parametersparameters 
    )
    +
    +inlinestatic
    +
    + +

    Verify a COSE_Sign1 with Additional Authenticated Data.

    +
    Parameters
    + + + + + + +
    [in,out]contextThe t_cose signature verification context.
    [in]sign1Pointer and length of CBOR encoded COSE_Sign1 message that is to be verified.
    [in]aadThe Additional Authenticated Data or NULL_Q_USEFUL_BUF_C.
    [out]payloadPointer and length of the payload.
    [out]parametersPlace to return parsed parameters. May be NULL.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    This is just like t_cose_sign1_verify(), but allows passing AAD (Additional Authenticated Data) for verification.

    +

    AAD is some additional bytes that are covered by the signature in addition to the payload. They may be any bytes, but are often some options or commands that are sent along with the COSE_Sign1. If a COSE_Sign1 was created with AAD, that AAD must be passed in here to successfully verify the signature. If it is not, a T_COSE_ERR_SIG_VERIFY will occur. There is no indication in the COSE_Sign1 to know whether there was AAD input when it was created. It has to be known by context.

    +

    Calling this with aad as NULL_Q_USEFUL_BUF_C is the same as calling t_cose_sign1_verify().

    + +
    +
    + +

    ◆ t_cose_sign1_verify_auxiliary_buffer_size()

    + +
    +
    + + + + + +
    + + + + + + + + +
    static size_t t_cose_sign1_verify_auxiliary_buffer_size (struct t_cose_sign1_verify_ctxcontext)
    +
    +inlinestatic
    +
    + +

    Get the required auxiliary buffer size for the most recent verification operation.

    +
    Parameters
    + + +
    [in,out]contextThe t_cose signature verification context.
    +
    +
    +
    Returns
    The number of bytes of auxiliary buffer used by the most recent verification operation.
    +

    This function can be called after t_cose_sign1_verify (or equivalent) was called. If the context was initialized with the DECODE_ONLY flag, it returns the number of bytes that would have been used by the signing operation. This allows the caller to allocate an appropriately sized buffer before performing the actual verification.

    +

    This function returns zero if the signature algorithm used does not need an auxiliary buffer.

    + +
    +
    + +

    ◆ t_cose_sign1_verify_detached()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    static enum t_cose_err_t t_cose_sign1_verify_detached (struct t_cose_sign1_verify_ctxcontext,
    struct q_useful_buf_c cose_sign1,
    struct q_useful_buf_c aad,
    struct q_useful_buf_c detached_payload,
    struct t_cose_parametersparameters 
    )
    +
    +inlinestatic
    +
    + +

    Verify a COSE_Sign1 with detached payload.

    +
    Parameters
    + + + + + + +
    [in,out]contextThe t_cose signature verification context.
    [in]cose_sign1Pointer and length of CBOR encoded COSE_Sign1 message that is to be verified.
    [in]aadThe Additional Authenticated Data or NULL_Q_USEFUL_BUF_C.
    [in]detached_payloadPointer and length of the payload.
    [out]parametersPlace to return parsed parameters. May be NULL.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    A detached payload is one that is not inside the COSE_Sign1, but is conveyed separately. It is still covered by the signature exactly as if it was the payload inside the COSE_Sign1.

    +

    This function is the same as t_cose_sign1_verify_aad(), but for use with a detached payload. Instead of the payload being returned, it must be passed in as it must have arrived separately from the COSE_Sign1. The signature covers it so it must be passed in to complete the verification.

    +

    aad may be NULL_Q_USEFUL_BUF_C if there is no AAD.

    + +
    +
    + +

    ◆ t_cose_sign1_verify_init()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static void t_cose_sign1_verify_init (struct t_cose_sign1_verify_ctxcontext,
    uint32_t option_flags 
    )
    +
    +inlinestatic
    +
    + +

    Initialize for COSE_Sign1 message verification.

    +
    Parameters
    + + + +
    [in,out]contextThe context to initialize.
    [in]option_flagsOptions controlling the verification.
    +
    +
    +

    This must be called before using the verification context.

    + +
    +
    + +

    ◆ t_cose_sign1_verify_internal()

    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    enum t_cose_err_t t_cose_sign1_verify_internal (struct t_cose_sign1_verify_ctxme,
    struct q_useful_buf_c sign1,
    struct q_useful_buf_c aad,
    struct q_useful_buf_c * payload,
    struct t_cose_parametersparameters,
    bool is_detached 
    )
    +
    + +

    Semi-private function to verify a COSE_Sign1.

    +
    Parameters
    + + + + + + + +
    [in,out]meThe t_cose signature verification context.
    [in]sign1Pointer and length of CBOR encoded COSE_Sign1 message that is to be verified.
    [in]aadThe Additional Authenticated Data or NULL_Q_USEFUL_BUF_C.
    [in,out]payloadPointer and length of the payload.
    [out]parametersPlace to return parsed parameters. May be NULL.
    [in]is_detachedIndicates the payload is detached.
    +
    +
    +
    Returns
    This returns one of the error codes defined by t_cose_err_t.
    +

    This does the work for t_cose_sign1_verify(), t_cose_sign1_verify_aad() and t_cose_sign1_verify_detached(). It is a semi-private function which means its interface isn't guaranteed so it should not to call it directly.

    + +
    +
    + +

    ◆ t_cose_sign1_verify_set_auxiliary_buffer()

    + +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + +
    static void t_cose_sign1_verify_set_auxiliary_buffer (struct t_cose_sign1_verify_ctxcontext,
    struct q_useful_buf auxiliary_buffer 
    )
    +
    +inlinestatic
    +
    + +

    Configure a buffer used to serialize the Sig_Structure.

    +
    Parameters
    + + + +
    [in,out]contextThe t_cose signature verification context.
    [in]auxiliary_bufferThe auxiliary buffer to be used.
    +
    +
    +

    Some signature algorithms (namely EdDSA), require two passes over their input. In order to achieve this, the library needs to serialize a temporary to-be-signed structure into an auxiliary buffer. This function allows the user to configure such a buffer.

    +

    The buffer must be big enough to accomodate the Sig_Structure type, which is roughly the sum of sizes of the encoded protected parameters, aad and payload, along with a few dozen bytes of overhead.

    +

    To compute the exact size needed, initialize the context with the T_COSE_OPT_DECODE_ONLY option, and call the t_cose_sign1_verify (or similar). After the message decoding, the necessary auxiliary buffer size is available by calling t_cose_sign1_verify_auxiliary_buffer_size.

    + +
    +
    +
    + + + + diff --git a/t__cose__sign1__verify_8h_source.html b/t__cose__sign1__verify_8h_source.html new file mode 100644 index 00000000..127e7d28 --- /dev/null +++ b/t__cose__sign1__verify_8h_source.html @@ -0,0 +1,362 @@ + + + + + + + +t_cose: inc/t_cose/t_cose_sign1_verify.h Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    t_cose +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    t_cose_sign1_verify.h
    +
    +
    +Go to the documentation of this file.
    1 /*
    +
    2  * t_cose_sign1_verify.h
    +
    3  *
    +
    4  * Copyright 2019-2021, Laurence Lundblade
    +
    5  *
    +
    6  * SPDX-License-Identifier: BSD-3-Clause
    +
    7  *
    +
    8  * See BSD-3-Clause license in README.md
    +
    9  */
    +
    10 
    +
    11 
    +
    12 #ifndef __T_COSE_SIGN1_VERIFY_H__
    +
    13 #define __T_COSE_SIGN1_VERIFY_H__
    +
    14 
    +
    15 #include <stdint.h>
    +
    16 #include <stdbool.h>
    +
    17 #include "t_cose/q_useful_buf.h"
    +
    18 #include "t_cose/t_cose_common.h"
    +
    19 #include "qcbor/qcbor_common.h"
    +
    20 
    +
    21 #ifdef __cplusplus
    +
    22 extern "C" {
    +
    23 #if 0
    +
    24 } /* Keep editor indention formatting happy */
    +
    25 #endif
    +
    26 #endif
    +
    27 
    +
    28 #ifndef QCBOR_SPIFFY_DECODE
    +
    29 #error This version of t_cose requires a version of QCBOR that supports spiffy decode
    +
    30 #endif
    +
    31 
    + + +
    79 
    +
    82  struct q_useful_buf_c kid;
    +
    83 
    +
    86  struct q_useful_buf_c iv;
    +
    87 
    +
    90  struct q_useful_buf_c partial_iv;
    +
    91 
    +
    92 #ifndef T_COSE_DISABLE_CONTENT_TYPE
    +
    95  struct q_useful_buf_c content_type_tstr;
    +
    96 
    + +
    101 #endif /* T_COSE_DISABLE_CONTENT_TYPE */
    +
    102 };
    +
    103 
    +
    104 
    +
    109 #define T_COSE_UNSET_ALGORITHM_ID 0
    +
    110 
    +
    111 
    +
    112 
    +
    113 
    +
    121 #define T_COSE_OPT_ALLOW_SHORT_CIRCUIT 0x00000001
    +
    122 
    +
    123 
    +
    131 #define T_COSE_OPT_REQUIRE_KID 0x00000002
    +
    132 
    +
    133 
    +
    148 #define T_COSE_OPT_TAG_REQUIRED 0x00000004
    +
    149 
    +
    150 
    +
    160 #define T_COSE_OPT_TAG_PROHIBITED 0x00000010
    +
    161 
    +
    162 
    +
    177 #define T_COSE_OPT_DECODE_ONLY 0x00000008
    +
    178 
    +
    179 
    +
    188 #define T_COSE_OPT_UNKNOWN_CRIT_ALLOWED 0x00000020
    +
    189 
    +
    190 
    +
    197 #define T_COSE_MAX_TAGS_TO_RETURN 4
    +
    198 
    +
    199 
    + +
    206  /* Private data structure */
    +
    207  struct t_cose_key verification_key;
    +
    208  uint32_t option_flags;
    +
    209  uint64_t auTags[T_COSE_MAX_TAGS_TO_RETURN];
    +
    210 
    +
    211 #ifndef T_COSE_DISABLE_EDDSA
    +
    217  struct q_useful_buf auxiliary_buffer;
    +
    218 
    +
    219  /* The size of the serialized Sig_Structure used in the last
    +
    220  * verification. This can be used by the user to determine a
    +
    221  * suitable auxiliary buffer size.
    +
    222  */
    +
    223  size_t auxiliary_buffer_size;
    +
    224 #endif
    +
    225 };
    +
    226 
    +
    227 
    +
    236 static void
    + +
    238  uint32_t option_flags);
    +
    239 
    +
    240 
    +
    289 static void
    + +
    291  struct t_cose_key verification_key);
    +
    292 
    +
    293 
    +
    316 static void
    + +
    318  struct q_useful_buf auxiliary_buffer);
    +
    319 
    +
    339 static size_t
    + +
    341 
    +
    391 static enum t_cose_err_t
    + +
    393  struct q_useful_buf_c sign1,
    +
    394  struct q_useful_buf_c *payload,
    +
    395  struct t_cose_parameters *parameters);
    +
    396 
    +
    397 
    +
    425 static enum t_cose_err_t
    + +
    427  struct q_useful_buf_c sign1,
    +
    428  struct q_useful_buf_c aad,
    +
    429  struct q_useful_buf_c *payload,
    +
    430  struct t_cose_parameters *parameters);
    +
    431 
    +
    432 
    +
    457 static inline enum t_cose_err_t
    + +
    459  struct q_useful_buf_c cose_sign1,
    +
    460  struct q_useful_buf_c aad,
    +
    461  struct q_useful_buf_c detached_payload,
    +
    462  struct t_cose_parameters *parameters);
    +
    463 
    +
    464 
    +
    483 static uint64_t
    + +
    485  size_t n);
    +
    486 
    +
    487 
    +
    488 
    +
    489 
    +
    490 /* ------------------------------------------------------------------------
    +
    491  * Inline implementations of public functions defined above.
    +
    492  */
    +
    493 static inline void
    + +
    495  uint32_t option_flags)
    +
    496 {
    +
    497  memset(me, 0, sizeof(*me));
    +
    498  me->option_flags = option_flags;
    +
    499 
    +
    500 #ifndef T_COSE_DISABLE_EDDSA
    +
    501  /* Start with large (but NULL) auxiliary buffer. If EdDSA is used,
    +
    502  * the Sig_Structure data will be serialized here.
    +
    503  */
    +
    504  me->auxiliary_buffer.len = SIZE_MAX;
    +
    505 #endif
    +
    506 }
    +
    507 
    +
    508 
    +
    509 static inline void
    + +
    511  struct t_cose_key verification_key)
    +
    512 {
    +
    513  me->verification_key = verification_key;
    +
    514 }
    +
    515 
    +
    516 static inline void
    + +
    518  struct q_useful_buf auxiliary_buffer)
    +
    519 {
    +
    520 #ifndef T_COSE_DISABLE_EDDSA
    +
    521  me->auxiliary_buffer = auxiliary_buffer;
    +
    522 #else
    +
    523  (void)me;
    +
    524  (void)auxiliary_buffer;
    +
    525 #endif
    +
    526 }
    +
    527 
    +
    528 static inline size_t
    + +
    530 {
    +
    531 #ifndef T_COSE_DISABLE_EDDSA
    +
    532  return me->auxiliary_buffer_size;
    +
    533 #else
    +
    534  /* If EdDSA is disabled we don't ever need an auxiliary buffer. */
    +
    535  (void)me;
    +
    536  return 0;
    +
    537 #endif
    +
    538 }
    +
    539 
    +
    540 
    +
    541 static inline uint64_t
    + +
    543  size_t n)
    +
    544 {
    +
    545  if(n > T_COSE_MAX_TAGS_TO_RETURN) {
    +
    546  return CBOR_TAG_INVALID64;
    +
    547  }
    +
    548  return context->auTags[n];
    +
    549 }
    +
    550 
    +
    551 
    +
    570 enum t_cose_err_t
    + +
    572  struct q_useful_buf_c sign1,
    +
    573  struct q_useful_buf_c aad,
    +
    574  struct q_useful_buf_c *payload,
    +
    575  struct t_cose_parameters *parameters,
    +
    576  bool is_detached);
    +
    577 
    +
    578 
    +
    579 static inline enum t_cose_err_t
    + +
    581  struct q_useful_buf_c sign1,
    +
    582  struct q_useful_buf_c *payload,
    +
    583  struct t_cose_parameters *parameters)
    +
    584 {
    + +
    586  sign1,
    +
    587  NULL_Q_USEFUL_BUF_C,
    +
    588  payload,
    +
    589  parameters,
    +
    590  false);
    +
    591 }
    +
    592 
    +
    593 
    +
    594 static inline enum t_cose_err_t
    + +
    596  struct q_useful_buf_c cose_sign1,
    +
    597  struct q_useful_buf_c aad,
    +
    598  struct q_useful_buf_c *payload,
    +
    599  struct t_cose_parameters *parameters)
    +
    600 {
    + +
    602  cose_sign1,
    +
    603  aad,
    +
    604  payload,
    +
    605  parameters,
    +
    606  false);
    +
    607 }
    +
    608 
    +
    609 
    +
    610 static inline enum t_cose_err_t
    + +
    612  struct q_useful_buf_c cose_sign1,
    +
    613  struct q_useful_buf_c aad,
    +
    614  struct q_useful_buf_c detached_payload,
    +
    615  struct t_cose_parameters *parameters)
    +
    616 {
    + +
    618  cose_sign1,
    +
    619  aad,
    +
    620  &detached_payload,
    +
    621  parameters,
    +
    622  true);
    +
    623 }
    +
    624 
    +
    625 #ifdef __cplusplus
    +
    626 }
    +
    627 #endif
    +
    628 
    +
    629 #endif /* __T_COSE_SIGN1_VERIFY_H__ */
    +
    This is a TF-M coding style version of UsefulBuf. See UsefulBuf for documentation of these functions.
    +
    Definition: t_cose_common.h:186
    +
    Definition: t_cose_sign1_verify.h:71
    +
    struct q_useful_buf_c iv
    Definition: t_cose_sign1_verify.h:86
    +
    struct q_useful_buf_c kid
    Definition: t_cose_sign1_verify.h:82
    +
    int32_t cose_algorithm_id
    Definition: t_cose_sign1_verify.h:78
    +
    struct q_useful_buf_c partial_iv
    Definition: t_cose_sign1_verify.h:90
    +
    uint32_t content_type_uint
    Definition: t_cose_sign1_verify.h:100
    +
    struct q_useful_buf_c content_type_tstr
    Definition: t_cose_sign1_verify.h:95
    +
    Definition: t_cose_sign1_verify.h:205
    +
    struct q_useful_buf auxiliary_buffer
    Definition: t_cose_sign1_verify.h:217
    +
    This file contains definitions common to all public t_cose interfaces.
    +
    t_cose_err_t
    Definition: t_cose_common.h:250
    +
    static size_t t_cose_sign1_verify_auxiliary_buffer_size(struct t_cose_sign1_verify_ctx *context)
    Get the required auxiliary buffer size for the most recent verification operation.
    Definition: t_cose_sign1_verify.h:529
    +
    static enum t_cose_err_t t_cose_sign1_verify_detached(struct t_cose_sign1_verify_ctx *context, struct q_useful_buf_c cose_sign1, struct q_useful_buf_c aad, struct q_useful_buf_c detached_payload, struct t_cose_parameters *parameters)
    Verify a COSE_Sign1 with detached payload.
    Definition: t_cose_sign1_verify.h:611
    +
    #define T_COSE_MAX_TAGS_TO_RETURN
    Definition: t_cose_sign1_verify.h:197
    +
    static uint64_t t_cose_sign1_get_nth_tag(const struct t_cose_sign1_verify_ctx *context, size_t n)
    Return unprocessed tags from most recent signature verify.
    Definition: t_cose_sign1_verify.h:542
    +
    static void t_cose_sign1_verify_init(struct t_cose_sign1_verify_ctx *context, uint32_t option_flags)
    Initialize for COSE_Sign1 message verification.
    Definition: t_cose_sign1_verify.h:494
    +
    static void t_cose_sign1_set_verification_key(struct t_cose_sign1_verify_ctx *context, struct t_cose_key verification_key)
    Set key for COSE_Sign1 message verification.
    Definition: t_cose_sign1_verify.h:510
    +
    static enum t_cose_err_t t_cose_sign1_verify(struct t_cose_sign1_verify_ctx *context, struct q_useful_buf_c sign1, struct q_useful_buf_c *payload, struct t_cose_parameters *parameters)
    Verify a COSE_Sign1.
    Definition: t_cose_sign1_verify.h:580
    +
    static enum t_cose_err_t t_cose_sign1_verify_aad(struct t_cose_sign1_verify_ctx *context, struct q_useful_buf_c sign1, struct q_useful_buf_c aad, struct q_useful_buf_c *payload, struct t_cose_parameters *parameters)
    Verify a COSE_Sign1 with Additional Authenticated Data.
    Definition: t_cose_sign1_verify.h:595
    +
    enum t_cose_err_t t_cose_sign1_verify_internal(struct t_cose_sign1_verify_ctx *me, struct q_useful_buf_c sign1, struct q_useful_buf_c aad, struct q_useful_buf_c *payload, struct t_cose_parameters *parameters, bool is_detached)
    Semi-private function to verify a COSE_Sign1.
    +
    static void t_cose_sign1_verify_set_auxiliary_buffer(struct t_cose_sign1_verify_ctx *context, struct q_useful_buf auxiliary_buffer)
    Configure a buffer used to serialize the Sig_Structure.
    Definition: t_cose_sign1_verify.h:517
    +
    + + + + diff --git a/tab_a.png b/tab_a.png new file mode 100644 index 00000000..3b725c41 Binary files /dev/null and b/tab_a.png differ diff --git a/tab_b.png b/tab_b.png new file mode 100644 index 00000000..e2b4a863 Binary files /dev/null and b/tab_b.png differ diff --git a/tab_h.png b/tab_h.png new file mode 100644 index 00000000..fd5cb705 Binary files /dev/null and b/tab_h.png differ diff --git a/tab_s.png b/tab_s.png new file mode 100644 index 00000000..ab478c95 Binary files /dev/null and b/tab_s.png differ diff --git a/tabs.css b/tabs.css new file mode 100644 index 00000000..7d45d36c --- /dev/null +++ b/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0px/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0px 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0px 1px 1px rgba(255,255,255,0.9);color:#283A5D;outline:none}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a.current{color:#D23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media (min-width: 768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283A5D transparent transparent transparent;background:transparent;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0px 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a:hover span.sub-arrow{border-color:#fff transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;border-radius:5px !important;box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent #fff}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #D23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#D23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}}