Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tc process and tc apply. #33

Merged
merged 19 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1197d21
WIP on TC_Process header/field parsing
dccutrig Dec 14, 2021
072ffb4
WIP on tc_process mac
dccutrig Dec 14, 2021
d34c5a9
WIP - IV refactor to pointer instead of hardcoded IV_SIZE memory blocks
IbraheemYSaleh Dec 14, 2021
8dbd965
Replace hardcoded SA byte-blocks with uint8 pointers
IbraheemYSaleh Dec 15, 2021
dfee1cb
Fixed Process Security MAC Code
rjbrown6 Dec 15, 2021
f1141b9
Merge fixTcProcess branch with collab_main
IbraheemYSaleh Dec 15, 2021
cdc1ea9
Add decryption to Process Security function
dccutrig Dec 15, 2021
22c591c
Added Assert for Return Status
rjbrown6 Dec 15, 2021
3296a70
Continuing TCApply/Process fixes
rjbrown6 Dec 15, 2021
7c732ca
Pass ball to Robert
dccutrig Dec 15, 2021
cc6f922
Modified Python
rjbrown6 Dec 15, 2021
506fe08
Fix unit test reliance on expose_sa function to use sadb routine calls
IbraheemYSaleh Dec 15, 2021
43cea33
Add support for AEAD vs non-AEAD algorithms in Crypto_TC_ApplySecurit…
IbraheemYSaleh Dec 16, 2021
64c836f
Update ProcessSecurity to support AEAD and authentication only auth m…
IbraheemYSaleh Dec 16, 2021
a5a4af7
Commit new check fecf configuration parameter throughout code & tests
IbraheemYSaleh Dec 16, 2021
db441f2
Update SADB MariaDB implementation to support variable IV, ABM, and A…
IbraheemYSaleh Dec 16, 2021
aaf2422
Minor Bug fixes for PR, added UT runs for PRs as well to .git/workflo…
rjbrown6 Dec 16, 2021
f0abea2
Fix for workflow -- hopefully
rjbrown6 Dec 16, 2021
510b809
Fix for workflow -- hopefully
rjbrown6 Dec 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build
on:
push:
branches: [ collab_main ]
pull_request:
branches: [ collab_main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/utest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Unit Tests
on:
push:
branches: [ collab_main ]
pull_request:
branches: [ collab_main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Validation Tests
on:
push:
branches: [ collab_main ]

pull_request:
branches: [ collab_main ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: DEBUG
Expand Down
10 changes: 5 additions & 5 deletions fsw/crypto_sadb/sadb_mariadb_admin_scripts/create_sadb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ CREATE TABLE security_associations
,shplf_len SMALLINT NOT NULL DEFAULT 0
,stmacf_len SMALLINT NOT NULL DEFAULT 0
,ecs_len SMALLINT
,ecs BINARY(4) NOT NULL DEFAULT X'00000000' -- ECS_SIZE=4
,ecs VARBINARY(4) NOT NULL DEFAULT X'00000000' -- ECS_SIZE=4
,iv_len SMALLINT NOT NULL DEFAULT 12
,iv BINARY(12) NOT NULL DEFAULT X'000000000000000000000000' -- IV_SIZE=12
,iv VARBINARY(20) NOT NULL DEFAULT X'000000000000000000000000' -- IV_SIZE=12
,acs_len SMALLINT NOT NULL DEFAULT 0
,acs SMALLINT NOT NULL DEFAULT 0
,abm_len MEDIUMINT
,abm BINARY(20) NOT NULL DEFAULT X'1111111111111111111111111111111111111111' -- ABM_SIZE=20
,abm VARBINARY(1024) NOT NULL DEFAULT X'1111111111111111111111111111111111111111' -- ABM_SIZE=1024
,arc_len SMALLINT NOT NULL DEFAULT 0
,arc BINARY(20) NOT NULL DEFAULT X'0000000000000000000000000000000000000000' -- ARC_SIZE=20 , TBD why so large...
,arc VARBINARY(20) NOT NULL DEFAULT X'0000000000000000000000000000000000000000' -- ARC_SIZE=20 , TBD why so large...
,arcw_len SMALLINT
,arcw BINARY(1) NOT NULL DEFAULT X'00' -- ARCW_SIZE=1
,arcw SMALLINT NOT NULL DEFAULT 0 -- ARCW_SIZE=1
);
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ USE sadb;

-- SA 1 - CLEAR MODE
INSERT INTO security_associations (spi,sa_state,est,ast,arc_len,arc,arcw_len,arcw,tfvn,scid,vcid,mapid)
VALUES (1,0,0,0,1,X'0000000000000000000000000000000000000000',1,X'05',0,3,0,0);
VALUES (1,0,0,0,1,X'0000000000000000000000000000000000000000',1,5,0,3,0,0);

-- SA 2 - OPERATIONAL; ARCW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-0
INSERT INTO security_associations (spi,ekid,sa_state,est,ast,shivf_len,iv_len,iv,abm_len,abm,arcw_len,arcw,arc_len,tfvn,scid,vcid,mapid)
-- VALUES (2,130,3,1,1,12,12,X'000000000000000000000001',20,X'0000000000000000000000000000000000000000',1,X'05',11,0,44,0,0);
VALUES (2,130,3,1,0,12,12,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',1,X'05',0,0,44,0,0);
-- VALUES (2,130,3,1,1,12,12,X'000000000000000000000001',20,X'0000000000000000000000000000000000000000',1,5,11,0,44,0,0);
VALUES (2,130,3,1,0,12,12,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',1,5,0,0,44,0,0);

-- SA 3 - OPERATIONAL; ARCW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-1
INSERT INTO security_associations (spi,ekid,sa_state,est,ast,shivf_len,iv_len,iv,abm_len,abm,arcw_len,arcw,arc_len,tfvn,scid,vcid,mapid)
VALUES (3,130,3,1,0,12,12,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',1,X'05',0,0,44,1,0);
VALUES (3,130,3,1,0,12,12,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',1,5,0,0,44,1,0);

-- SA 4 - OPERATIONAL; ARCW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-2
INSERT INTO security_associations (spi,ekid,sa_state,est,ast,shivf_len,iv_len,iv,abm_len,abm,arcw_len,arcw,arc_len,tfvn,scid,vcid,mapid)
VALUES (4,130,3,1,0,12,12,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',1,X'05',0,0,44,2,0);
VALUES (4,130,3,1,0,12,12,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',1,5,0,0,44,2,0);

-- SA 5 - OPERATIONAL; ARCW:5; AES-GCM; IV:00...01; IV-len:12; MAC-len:16; Key-ID: 130, SCID 44, VC-3
INSERT INTO security_associations (spi,ekid,sa_state,est,ast,shivf_len,iv_len,iv,abm_len,abm,arcw_len,arcw,arc_len,tfvn,scid,vcid,mapid)
VALUES (4,130,3,1,0,12,12,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',1,X'05',0,0,44,3,0);
VALUES (4,130,3,1,0,12,12,X'000000000000000000000001',19,X'00000000000000000000000000000000000000',1,5,0,0,44,3,0);
2 changes: 1 addition & 1 deletion fsw/crypto_util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include_directories(../crypto/public_inc)

if(${ENCTEST})
find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
execute_process(COMMAND pip show pycryptodome RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET)
execute_process(COMMAND pip3 show pycryptodome RESULT_VARIABLE EXIT_CODE OUTPUT_QUIET)
if(NOT ${EXIT_CODE} EQUAL 0)
message(FATAL_ERROR "The \"pycryptodome\" Python3 package is not installed, and is required for ENCTEST.")
endif()
Expand Down
Loading