-
Notifications
You must be signed in to change notification settings - Fork 4
/
MultiRecipientHybridEncryptionSignFrm.dfm
758 lines (758 loc) · 17.8 KB
/
MultiRecipientHybridEncryptionSignFrm.dfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
object FrmMultiRecipientHybridEncryptionSign: TFrmMultiRecipientHybridEncryptionSign
Left = 0
Top = 0
Caption = 'Hybrid Encryption for Multiple Recipients with Sender Signature '
ClientHeight = 702
ClientWidth = 1008
Color = clBtnFace
Constraints.MinHeight = 720
Constraints.MinWidth = 1000
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
OnCreate = FormCreate
DesignSize = (
1008
702)
TextHeight = 15
object ShapeResult: TShape
Left = 16
Top = 643
Width = 964
Height = 38
Anchors = [akLeft, akRight, akBottom]
Shape = stRoundRect
ExplicitTop = 1375
ExplicitWidth = 974
end
object LabelAlgo: TLabel
Left = 16
Top = 24
Width = 123
Height = 15
Anchors = [akLeft, akTop, akRight]
Caption = 'Symmetrical Algorithm'
end
object LabelResult: TLabel
Left = 39
Top = 652
Width = 889
Height = 20
Alignment = taCenter
Anchors = [akLeft, akRight, akBottom]
AutoSize = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = 20
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
ExplicitWidth = 915
end
object Label1: TLabel
Left = 472
Top = 24
Width = 130
Height = 15
Caption = 'Asymmetrical Algorithm'
end
object cboSymAlgo: TComboBox
Left = 152
Top = 21
Width = 209
Height = 23
Style = csDropDownList
ItemIndex = 1
TabOrder = 0
Text = 'AesCbcPkcs7'
OnChange = cboAlgosChange
Items.Strings = (
'AesCbc'
'AesCbcPkcs7'
'AesEcb'
'AesEcbPkcs7')
end
object cboSymKeySize: TComboBox
Left = 373
Top = 21
Width = 69
Height = 23
Style = csDropDownList
ItemIndex = 2
TabOrder = 1
Text = '256'
OnChange = CheckKeySizes
Items.Strings = (
'128'
'192'
'256')
end
object cboAsymAlgo: TComboBox
Left = 608
Top = 21
Width = 273
Height = 23
Style = csDropDownList
ItemIndex = 2
TabOrder = 2
Text = 'RsaOaepSha256'
OnChange = cboAlgosChange
Items.Strings = (
'RsaPkcs1'
'RsaOaepSha1'
'RsaOaepSha256'
'RsaOaepSha384'
'RsaOaepSha512')
end
object PageControl: TPageControl
Left = 18
Top = 65
Width = 962
Height = 348
ActivePage = tabKeys
Anchors = [akLeft, akTop, akRight, akBottom]
TabOrder = 3
object tabKeys: TTabSheet
Caption = 'Key Management'
DesignSize = (
954
318)
object LabelPublicKey: TLabel
Left = 19
Top = 64
Width = 55
Height = 15
Caption = 'Public Key'
end
object LabelPrivateKey: TLabel
Left = 19
Top = 93
Width = 58
Height = 15
Caption = 'Private Key'
end
object Label7: TLabel
Left = 19
Top = 120
Width = 52
Height = 15
Caption = 'Key name'
end
object lblKeysSize: TLabel
Left = 632
Top = 120
Width = 295
Height = 15
Alignment = taRightJustify
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'Public key size / Private key size [bytes]'
ExplicitLeft = 658
end
object btnCreatePersonalKeys: TButton
Left = 19
Top = 18
Width = 122
Height = 25
Caption = 'Create Personal Key'
TabOrder = 0
OnClick = btnCreatePersonalKeysClick
end
object btnSavePersonalKeys: TButton
Left = 19
Top = 157
Width = 126
Height = 25
Caption = 'Save Personal Keys'
Enabled = False
TabOrder = 1
OnClick = btnSavePersonalKeysClick
end
object btnLoadKeys: TButton
Left = 147
Top = 18
Width = 141
Height = 25
Caption = 'Load Personal Keys'
TabOrder = 2
OnClick = btnLoadKeysClick
end
object btnLoadPubKey: TButton
Left = 294
Top = 18
Width = 157
Height = 25
Caption = 'Load Personal Public Key'
TabOrder = 3
OnClick = btnLoadPubKeyClick
end
object edtPublicKey: TEdit
Left = 133
Top = 61
Width = 802
Height = 23
Anchors = [akLeft, akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
TabOrder = 4
end
object edtPrivateKey: TEdit
Left = 133
Top = 88
Width = 802
Height = 23
Anchors = [akLeft, akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
TabOrder = 5
end
object edtKeyName: TEdit
Left = 133
Top = 117
Width = 287
Height = 23
TabOrder = 6
end
end
object tabEncryption: TTabSheet
Caption = 'Message Encryption'
ImageIndex = 1
DesignSize = (
954
318)
object Label2: TLabel
Left = 16
Top = 12
Width = 210
Height = 15
Caption = 'Clear text as encryption input argument'
end
object Label8: TLabel
Left = 16
Top = 105
Width = 89
Height = 15
Anchors = [akLeft, akBottom]
Caption = 'List of Recipients'
ExplicitTop = 117
end
object LabelKey: TLabel
Left = 18
Top = 276
Width = 103
Height = 15
Anchors = [akLeft, akBottom]
Caption = 'Created session key'
ExplicitTop = 288
end
object LabelSymKeySize: TLabel
Left = 853
Top = 275
Width = 79
Height = 15
Alignment = taRightJustify
Anchors = [akLeft, akRight, akBottom]
AutoSize = False
Caption = 'Key size [bits]'
ExplicitTop = 287
ExplicitWidth = 105
end
object Label13: TLabel
Left = 147
Top = 239
Width = 105
Height = 15
Anchors = [akLeft, akBottom]
Caption = 'Sender'#39's Private Key'
end
object btnEncrypt: TButton
Left = 16
Top = 234
Width = 105
Height = 25
Anchors = [akLeft, akBottom]
Caption = 'Encrypt and Sign'
Enabled = False
TabOrder = 0
OnClick = btnEncryptClick
end
object MemoClear: TMemo
Left = 16
Top = 33
Width = 919
Height = 60
Anchors = [akLeft, akTop, akRight, akBottom]
Lines.Strings = (
'MemoClear')
TabOrder = 1
end
object lstRecipients: TListBox
Left = 17
Top = 126
Width = 919
Height = 55
Anchors = [akLeft, akRight, akBottom]
ItemHeight = 15
TabOrder = 2
end
object btnAddRecipient: TButton
Left = 231
Top = 187
Width = 201
Height = 25
Anchors = [akLeft, akBottom]
Caption = 'Add Recipient from Public Key File'
TabOrder = 3
OnClick = btnAddRecipientClick
end
object EditSessionKey: TEdit
Left = 152
Top = 271
Width = 669
Height = 23
Anchors = [akLeft, akRight, akBottom]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
ReadOnly = True
TabOrder = 4
end
object btnClearRecipients: TButton
Left = 445
Top = 187
Width = 98
Height = 25
Anchors = [akLeft, akBottom]
Caption = 'Clear Recipients'
TabOrder = 5
OnClick = btnClearRecipientsClick
end
object btnAddCreatedKeyAsRecipient: TButton
Left = 16
Top = 187
Width = 201
Height = 25
Anchors = [akLeft, akBottom]
Caption = 'Add created Public Key as Recipient'
TabOrder = 6
OnClick = btnAddCreatedKeyAsRecipientClick
end
object edtSenderPrivateKey: TEdit
Left = 264
Top = 235
Width = 461
Height = 23
Anchors = [akLeft, akRight, akBottom]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
TabOrder = 7
end
object btnAddCreatedKeyAsSender: TButton
Left = 731
Top = 234
Width = 201
Height = 25
Anchors = [akRight, akBottom]
Caption = 'Add created Private Key as Sender'
TabOrder = 8
OnClick = btnAddCreatedKeyAsSenderClick
end
end
object TabDecryption: TTabSheet
Caption = 'Message Decryption'
ImageIndex = 2
DesignSize = (
954
318)
object Label5: TLabel
Left = 17
Top = 190
Width = 115
Height = 15
Anchors = [akLeft, akTop, akRight]
Caption = 'Encrypted session key'
end
object Label6: TLabel
Left = 17
Top = 221
Width = 195
Height = 15
Caption = 'Clear text as decryption output result'
end
object LabelDecryptedSessionKeySize: TLabel
Left = 826
Top = 190
Width = 113
Height = 15
Alignment = taRightJustify
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'Key size [bits]'
ExplicitLeft = 852
end
object Label9: TLabel
Left = 16
Top = 87
Width = 106
Height = 15
Caption = 'Personal Private Key'
end
object Label10: TLabel
Left = 16
Top = 114
Width = 32
Height = 15
Caption = 'Name'
end
object Label11: TLabel
Left = 16
Top = 60
Width = 103
Height = 15
Caption = 'Personal Public Key'
end
object lblHintPublicKeyMissingInHeader: TLabel
Left = 457
Top = 114
Width = 390
Height = 15
Caption =
'The personal public key is missing in the header of the encrypte' +
'd message'
Font.Charset = DEFAULT_CHARSET
Font.Color = clRed
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
ParentFont = False
StyleElements = [seClient, seBorder]
end
object Label14: TLabel
Left = 156
Top = 154
Width = 102
Height = 15
Caption = 'Sender'#39's Public Key'
end
object btnDecrypt: TButton
Left = 17
Top = 150
Width = 130
Height = 25
Caption = 'Decrypt and Verify'
Enabled = False
TabOrder = 0
OnClick = btnDecryptClick
end
object EditDecryptedSessionKey: TEdit
Left = 159
Top = 187
Width = 661
Height = 23
Anchors = [akLeft, akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
ReadOnly = True
TabOrder = 1
end
object MemoResult: TMemo
Left = 17
Top = 242
Width = 915
Height = 60
Anchors = [akLeft, akTop, akRight, akBottom]
ReadOnly = True
TabOrder = 2
end
object edtPersonalPrivateKey: TEdit
Left = 130
Top = 82
Width = 802
Height = 23
Anchors = [akLeft, akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
TabOrder = 3
end
object edtPersonalName: TEdit
Left = 130
Top = 111
Width = 287
Height = 23
TabOrder = 4
end
object btnLoadPersonalKey: TButton
Left = 161
Top = 18
Width = 248
Height = 25
Caption = 'Load Personal Keys from Private Key File'
TabOrder = 5
OnClick = btnLoadPersonalKeyClick
end
object edtPersonalPublicKey: TEdit
Left = 130
Top = 53
Width = 802
Height = 23
Anchors = [akLeft, akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
TabOrder = 6
end
object btnLoadCreatedKeys: TButton
Left = 16
Top = 18
Width = 131
Height = 25
Caption = 'Load created Keys'
TabOrder = 7
OnClick = btnLoadCreatedKeysClick
end
object edtSenderPublicKey: TEdit
Left = 264
Top = 151
Width = 369
Height = 23
Anchors = [akLeft, akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
TabOrder = 8
end
object btnLoadSenderPublicKey: TButton
Left = 760
Top = 150
Width = 172
Height = 25
Anchors = [akTop, akRight]
Caption = 'Load Public Key from Sender'
TabOrder = 9
OnClick = btnLoadSenderPublicKeyClick
end
object edtSenderName: TEdit
Left = 639
Top = 151
Width = 115
Height = 23
Anchors = [akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
TabOrder = 10
end
end
end
object cboAsymKeySize: TComboBox
Left = 895
Top = 21
Width = 69
Height = 23
Style = csDropDownList
ItemIndex = 1
TabOrder = 0
Text = '3072'
OnChange = CheckKeySizes
Items.Strings = (
'2048'
'3072'
'4096')
end
object gpbEncryptedMessage: TGroupBox
Left = 18
Top = 419
Width = 962
Height = 206
Anchors = [akLeft, akRight, akBottom]
Caption = 'Encrypted Message'
TabOrder = 5
DesignSize = (
962
206)
object Label3: TLabel
Left = 14
Top = 108
Width = 42
Height = 15
Caption = 'Payload'
end
object Label4: TLabel
Left = 14
Top = 26
Width = 290
Height = 15
Caption = 'Public key with encrypted session keys for all recipients'
end
object lblHeaderSize: TLabel
Left = 611
Top = 26
Width = 331
Height = 15
Alignment = taRightJustify
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'Header Size [bytes]'
ExplicitLeft = 621
end
object lblPayloadSize: TLabel
Left = 611
Top = 108
Width = 335
Height = 15
Alignment = taRightJustify
Anchors = [akTop, akRight]
AutoSize = False
Caption = 'Payload size [bytes]'
ExplicitLeft = 621
end
object LabelIV: TLabel
Left = 13
Top = 170
Width = 10
Height = 15
Caption = 'IV'
end
object Label12: TLabel
Left = 344
Top = 168
Width = 50
Height = 15
Caption = 'Signature'
end
object btnLoadEncryptedMessage: TButton
Left = 792
Top = 168
Width = 150
Height = 23
Anchors = [akTop, akRight]
Caption = 'Load Encrypted Message'
TabOrder = 0
OnClick = btnLoadEncryptedMessageClick
end
object btnSaveEncryptedMsg: TButton
Left = 631
Top = 168
Width = 155
Height = 25
Anchors = [akTop, akRight]
Caption = 'Save Encrypted Message'
TabOrder = 1
OnClick = btnSaveEncryptedMsgClick
end
object edtEncryptedPayload: TEdit
Left = 14
Top = 129
Width = 932
Height = 23
Anchors = [akLeft, akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpFixed
Font.Style = []
ParentFont = False
ReadOnly = True
TabOrder = 2
Text = 'edtEncryptedPayload'
end
object lstHeader: TListBox
Left = 14
Top = 47
Width = 932
Height = 55
Anchors = [akLeft, akTop, akRight]
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpVariable
Font.Style = []
ItemHeight = 15
ParentFont = False
TabOrder = 3
end
object edtIV: TEdit
Left = 29
Top = 166
Width = 297
Height = 23
TabOrder = 4
end
object edtSignature: TEdit
Left = 400
Top = 166
Width = 217
Height = 23
TabOrder = 5
end
end
object SaveDialog: TSaveDialog
DefaultExt = 'crypt2'
Filter = 'Encrypted and signed message (*.crypt2)|*.crypt2'
Left = 472
Top = 592
end
object OpenDialog: TOpenDialog
DefaultExt = 'crypt2'
Filter = 'Encrypted and signed message (*.crypt2)|*.crypt2'
Left = 544
Top = 592
end
object OpenDialogPrivateKey: TOpenDialog
DefaultExt = 'PrivateKey'
Filter = 'Private Key (*.PrivateKey)|*.PrivateKey'
Left = 760
Top = 592
end
object OpenDialogPublicKey: TOpenDialog
DefaultExt = 'PublicKey'
Filter = 'Public Key (*.PublicKey)|*.PublicKey'
Left = 904
Top = 592
end
end