Skip to content

6214 Цветков А.А. Лаб.3 Вар.22#266

Open
avof1ow wants to merge 17 commits intoitsecd:mainfrom
avof1ow:lab3_var22
Open

6214 Цветков А.А. Лаб.3 Вар.22#266
avof1ow wants to merge 17 commits intoitsecd:mainfrom
avof1ow:lab3_var22

Conversation

@avof1ow
Copy link

@avof1ow avof1ow commented Sep 19, 2025

Точка входа:
app.py - точка входа в приложение. Запускает GUI.

Файл с зависимостями:
requirements.txt

Модули интерфейса:
Файл Описание
gui/main_window.py Основное окно приложения (логика интерфейса).
gui/styles.py Файл с настройкой стилей.
gui/widgets.py Файл с настройкой виджетов.
Модули шифрования:
Файл Описание
core/crypto.py Реализация RSA-AES: генерация ключей, шифрование/дешифрование.
core/exceptions.py Исключения для обработки ошибок крипто-операций.
core/init.py Модуль пакета core, создающий единую точку доступа к функциям и классам.
Вспомогательные утилиты:
Файл Описание
utils/file_io.py Безопасное чтение/запись бинарных и текстовых файлов.
utils/config_manager.py Управление настройками приложения (тема, пути к файлам).
utils/init.py Модуль пакета utils, создающий единую точку доступа к функциям и классам.
config/settings.json JSON-file с настройками.
config/init.py Модуль пакета config, cодержит константы путей для удобного импорта в других модулях.
Остальные файлы:
Ключи:

Ключ Описание
keys/private.pem Приватный RSA-ключ, предназначен для дешифровки симметричного AES-ключа, зашифрованного публичным (public.pem) ключом.
keys/public.pem Публичный RSA-ключ.
keys/encrypted_key.bin Зашифрованный AES-ключ.
Текстовые файлы:

Текст Описание
src/plain_text.txt Исходный текст
src/encrypted.bin Зашифрованный, при помощи public ключа, текст
src/decrypted.txt Расшифрованный, при помощи private ключа, текст

@github-actions github-actions bot added In progress Код в процессе проверки Lab 3 Лабораторная 3 "Построение гибридной криптосистемы" labels Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделать clean up кода

Comment on lines 63 to 67

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

для выбора режима использовать match/case

Comment on lines 1 to 6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не соответствует PEP

Comment on lines 67 to 68

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вы ловите исключения и никак их не обрабатываете

Comment on lines 17 to 24

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вынести в файл с настройками

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

у вас для этого целая функция есть

Comment on lines +1 to +4
import json
from pathlib import Path
from typing import Any, Optional

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не соответствует PEP

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. зачем вы объявляете глобальную переменную?
  2. почему это исполняемый файл? в нем нет кода, только импорт библиотек
  3. подумайте еще раз

Comment on lines 5 to 18

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нет ни одного вызова для этих исключений

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

замечания аналогично ISB_LAB_3/utils/init.py

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не исправлено

  1. зачем вы объявляете глобальную переменную?
  2. почему это исполняемый файл? в нем нет кода, только импорт библиотек
  3. подумайте еще раз

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не исправлено

Comment on lines +6 to +23
class KeyGenerationError(CryptoError):
"""Исключение при генерации ключей."""
pass


class EncryptionError(CryptoError):
"""Исключение при шифровании данных."""
pass


class DecryptionError(CryptoError):
"""Исключение при дешифровании данных."""
pass


class FileOperationError(CryptoError):
"""Исключение при операциях с файлами (чтение/запись)."""
pass

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не исправлено

нет ни одного вызова для этих исключений

Comment on lines 1 to 9

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а зачем вам этот исполняемый модуль? что вы здесь делаете?
Проимпортировали библиотеки, нигде их не используете.
Создали глобальную переменную, которую тоже нигде не используете. И вообще зачем вам этот список переменных?

Comment on lines 80 to 81

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

добавьте обработку исключений

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не исправлено

Copy link

@Daria-creator-lab Daria-creator-lab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

In progress Код в процессе проверки Lab 3 Лабораторная 3 "Построение гибридной криптосистемы"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments