Skip to content

Commit 2555d35

Browse files
committed
Added about iterations
1 parent 0efba37 commit 2555d35

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

include/mainwindow.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ private slots:
4747
void on_actionExit_triggered();
4848
void on_actionPreferences_triggered();
4949
void on_actionAbout_triggered();
50-
void on_actionAboutCiphers_triggered(); // New slot
51-
void on_actionAboutKDFs_triggered(); // New slot
50+
void on_actionAboutCiphers_triggered();
51+
void on_actionAboutKDFs_triggered();
52+
void on_actionAboutIterations_triggered(); // Add this line
5253
void applyTheme(const QString &theme);
5354

5455
private:

src/mainwindow.cpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ void MainWindow::connectSignalsAndSlots()
147147
safeConnect(ui->actionExit, SIGNAL(triggered()), this, SLOT(on_actionExit_triggered()));
148148
safeConnect(ui->actionPreferences, SIGNAL(triggered()), this, SLOT(on_actionPreferences_triggered()));
149149
safeConnect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(on_actionAbout_triggered()));
150-
safeConnect(ui->actionAboutCiphers, SIGNAL(triggered()), this, SLOT(on_actionAboutCiphers_triggered())); // New connection
151-
safeConnect(ui->actionAboutKDFs, SIGNAL(triggered()), this, SLOT(on_actionAboutKDFs_triggered())); // New connection
150+
safeConnect(ui->actionAboutCiphers, SIGNAL(triggered()), this, SLOT(on_actionAboutCiphers_triggered()));
151+
safeConnect(ui->actionAboutKDFs, SIGNAL(triggered()), this, SLOT(on_actionAboutKDFs_triggered()));
152+
safeConnect(ui->actionAboutIterations, SIGNAL(triggered()), this, SLOT(on_actionAboutIterations_triggered()));
152153

153154
m_signalsConnected = true;
154155
}
@@ -512,3 +513,20 @@ void MainWindow::on_actionAboutKDFs_triggered() {
512513

513514
QMessageBox::information(this, "About KDFs", aboutKDFsText);
514515
}
516+
517+
void MainWindow::on_actionAboutIterations_triggered()
518+
{
519+
QString aboutIterationsText = QString(
520+
"About Iterations:\n\n"
521+
"The number of iterations used in key derivation functions (KDFs) is a critical factor in the security "
522+
"of the encryption process. Iterations increase the computational effort required to derive the encryption "
523+
"key, making brute-force attacks more difficult.\n\n"
524+
"Recommended Iteration Counts:\n"
525+
"- Argon2: 10 or more iterations. Argon2 is memory-hard, and higher iterations further increase security.\n"
526+
"- Scrypt: N = 2^20 (1,048,576) or higher. Scrypt is also memory-hard, and high iteration counts make it more resistant to attacks.\n"
527+
"- PBKDF2: 10,000,000 or more iterations. PBKDF2 relies on high iteration counts to increase security.\n\n"
528+
"For maximum security, consider using higher iteration counts, especially if performance is not a critical concern."
529+
);
530+
531+
QMessageBox::information(this, "About Iterations", aboutIterationsText);
532+
}

ui/mainwindow.ui

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,17 @@
396396
<addaction name="actionAbout"/>
397397
<addaction name="actionAboutCiphers"/>
398398
<addaction name="actionAboutKDFs"/>
399+
<addaction name="actionAboutIterations"/> <!-- Add this line -->
399400
</widget>
400401
<addaction name="menuFile"/>
401402
<addaction name="menuEdit"/>
402403
<addaction name="menuHelp"/>
403404
</widget>
405+
<action name="actionAboutIterations"> <!-- Add this block -->
406+
<property name="text">
407+
<string>About Iterations</string>
408+
</property>
409+
</action>
404410
<action name="actionExit">
405411
<property name="text">
406412
<string>Exit</string>

0 commit comments

Comments
 (0)