* Core: event_flag, removing duplicate code
* event_loop: add support furi_event_flags
* Examples: add missing free in event loop examples
* Furi: fix event flag
* Sync api symbols
* Unit_test: evet_loop_event_flags
* Fix multiple waiting list elements handling
* Unit_test: add event_loop_event_flag test
* FURI: event_loop add restrictions
* Fix multiple waiting lists items for good
* Improve FuriEventLoop unit tests
* Abolish callback return value
* Remove return value from callback signature
* Use bool level value instead of int32_t
* Add unit tests for FuriStreamBuffer
* Add unit tests for FuriSemaphore
* Speed up test execution
* Improve docs
* Add a stub for furi os-level primitives
* Add more checks for edge cases
* Allow event loop notification from ISR
* Bump api version
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
* Initial structure for nonce collection
* Nonce logging
* Dictionary attack structure
* Fix compilation
* Identified method to reduce candidate states
* Use EXT_PATH instead of ANY_PATH
* Use median calibrated distance, collect parity bits
* Modify parity collection
* Fixed parity bit collection
* Add note to fix nonce logging
* Fix nonce logging
* Clean redundant code
* Fix valid_nonce
* First attempt disambiguous nonce implementation
* FM11RF08S backdoor detection
* Initial accelerated dictionary attack for weak PRNGs
* Refactor to nested dictionary attack
* Renaming some variables
* Hard PRNG support for accelerated dictionary attack
* Update found keys, initial attempt
* Update found keys, second attempt
* Code cleanup
* Misc bugfixes
* Only use dicts in search_dicts_for_nonce_key if we have them
* Collect nonces again
* Should be detecting both backdoors now
* Relocate backdoor detection
* Hardnested support
* Fix regression for regular nested attack
* Backdoor read
* Backdoor working up to calibration
* Backdoor nested calibration
* Don't recalibrate hard PRNG tags
* Static encrypted nonce collection
* Update TODO
* NFC app UI updates, MVP
* Bump f18 API version (all functions are NFC related)
* Add new backdoor key, fix UI status update carrying over from previous read
* Clear TODO line
* Fix v1/v2 backdoor nonce collection
* Speed up backdoor detection, alert on new backdoor
* Add additional condition to backdoor check
* I'll try freeing memory, that's a good trick!
* Do not enter nested attack if card is already finished
* Do not reset the poller between collected nonces
* Clean up various issues
* Fix Hardnested sector/key type logging
* Add nested_target_key 64 to TODO
* Implement progress bar for upgraded attacks in NFC app
* Typo
* Zero nested_target_key and msb_count on exit
* Note TODO (malloc)
* Dismiss duplicate nonces
* Fix calibration (ensure values are within 3 standard deviations)
* Log static
* No nested dictionary attack re-entry
* Note minor inefficiency
* Uniformly use crypto1_ prefix for symbols in Crypto1 API
* Fix include paths
* Fix include paths cont
* Support CUID dictionary
* Fix log levels
* Avoid storage errors, clean up temporary files
* Handle invalid key candidates
* Fix memory leak in static encrypted attack
* Fix memory leak, use COUNT_OF macro
* Use single call to free FuriString
* Refactor enums to avoid redefinition
* Fix multiple crashes and state machine logic
* Fix inconsistent assignment of known key and known key type/sector
* Backdoor known key logic still needs the current key
* Larger data type for 4K support
* Fix typo
* Fix issue with resume logic
* Mark TODOs for next PR
* Remove redundant assignment
* Fix size_t format specifier
* Simplify auth_passed condition
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
* FuriThread: Make FuriThreadPriorityIdle equal to the FreeRTOS one, remove FuriThreadPriorityNone
This magic constant was meaningless,
FuriThreadPriorityNormal is now assigned by default instead.
* Make furi_thread_list_process private
Its 'runtime' parameter is to be obtained from FreeRTOS,
which means apps cannot do it.
* DirectDraw: Remove an useless include and fix memory leak
Makes this debug app compileable with uFBT out of the box
Co-authored-by: あく <alleteam@gmail.com>
strlcpy doesn't zero the buffer and ensures null termination,
just like snprintf
strlcat is already used by mjs and it's a safe alternative to strcat,
so it should be OK to expose to apps
- Keep ccid_callback and buffer as private to the iso7816_handler
- set usb ccid callback from iso7816_handler (to ensure the right structure is being passed)
- make iso7816 related code independent from furi related code (goal is to make it independently testable)
- rename vars
Co-authored-by: あく <alleteam@gmail.com>
* Make file extensions case-insensitive
* Bump protobuf version
* Add support for 5V control via RPC
* Add support for 5V control via Expansion protocol
* Update running instructions
* Update expansion module documentation
* Prettify condition
* Test RPC OTG control as well
* Assets: bump protobuf version
* Disable PVS license expiration check, fix PVS warnings
Co-authored-by: あく <alleteam@gmail.com>
* Abstract primitive type from main logic in FuriEventLoop
* Remove message_queue_i.h
* Add stream buffer support for event loop
* Add semaphore support for event loop
* Add temporary unit test workaround
* Make the linter happy
* Add mutex support for event loop
* Implement event subscription and unsubscription while the event loop is running
* Implement edge events
* Fix leftover logical errors
* Add event loop timer example application
* Implement flag-based edge trigger and one-shot mode
* Add event loop mutex example application
* Only notify the event loop if stream buffer is at or above its trigger level
* Reformat comments
* Add event loop stream buffer example application
* Add event loop multiple elements example application
* Improve event loop flag names
* Remove redundant signal handler as it is already handled by the event loop
* Refactor Power service, improve ViewHolder
* Use ViewHolder instead of ViewDispatcher in About app
* Enable ViewDispatcher queue on construction, deprecate view_dispatcher_enable_queue()
* Remove all invocations of view_dispatcher_enable_queue()
* Remove app-scened-template
* Remove missing library from target.json
* Port Accessor app to ViewHolder
* Make the linter happy
* Add example_view_holder application, update ViewHolder docs
* Add example_view_dispatcher application, update ViewDispatcher docs
* Replace FuriSemaphore with FuriApiLock, remove workaround delay
* Fix logical error
* Fix another logical error
* Use the sources directive to speed up compilation
* Use constant define macro
* Improve FuriEventLoop documentation
* Improve FuriEventLoop documentation once more
* Bump API Version
* Gui: remove redundant checks from ViewDispatcher
* Gui: remove dead ifs from ViewDispatcher
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
* Storage: drop internal storage
* Storage: rollback some unnecessary changes
* Storage: rollback some unnecessary changes part 2
* Storage: cleanup various defines and int handling. Ble: allow short connection interval if internal flash is not used.
* Storage: do not return storage if it is not ready
* Save PIN code to RTC, update settings
* Simplify the code, clean up includes
* Rearrange some code
* apps: storage_move_to_sd: conditionally enable with --extra-define=STORAGE_INT_ON_LFS
* Load Desktop settings automatically
* Redirect /any to /ext
* Abolish storage_move_to_sd app
* Remove as many mentions of ANY_PATH as possible
* Fix desktop settings wrongly not loading
* Improve desktop settings handling and strings
* Load BLE settings and keys automatically
* Improve BLE configuration procedure
* Do not load bluetooth keys twice if they were already loaded
* Load dolphin state automatically
* Fix merge artifact
* Load notification settings automatically
* Update desktop settings strings
* Load expansion settings automatically
* Do not use thread signals to reload desktop settings
* Load region data automatically, separate to its own hook
* Improve ble behaviour with no keys
* Fix Dolphin state not resetting correctly
* Add a status check
* Make Desktop save its own settings
* Check result when taking and releasing mutex
* Improve default thread signal handling in FuriEventLoop
* Make bt service in charge of saving settings, add settings api
* Fix a deadlock due to timer thread not receiving time
* Lock core2 when reinitialising bt
* Update clang-format
* Revert "Update clang-format"
This reverts commit d61295ac063c6ec879375ceeab54d6ff2c90a9a1.
* Format sources with clang-format
* Revert old stack size for desktop settings
* Allocate big struct dynamically
* Simplify PIN comparison
* Save pointer to storage in Desktop object
* Fix region provisioning for hardware regions
* Remove stale TODO + siimplify code
* Clean up region.c
* Use sizeof instead of macro define
* Limit PIN length to 10 for consistency
* Emit a warning upon usage of /any
* Add delay after finding flipper
* Remove unnecessary delay
* Remove all mentions of STORAGE_INT_ON_LFS
* Remove littlefs and internal storage
* Remove all possible LittleFS mentions
* Fix browser tab in Archive
* Ble: fix connection interval explanation
* Bump API Symbols
* BLE: Update comments interval connection comments
* Storage: clear FuriHalRtcFlagStorageFormatInternal if set
---------
Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
* Added Dickert MAHS protocol
* Update protocol_items.c
* Added Dickert MAHS protocol reference
* Update protocol_items.h
* Removed logging and some defines
* Reworked the send code to properly adhere to Dickert timings
* Added subghz unit test for Dickert MAHS
* Minor fix in encoding length
* Added Dickert Decoder Test to subghz unit tests and set repeat=10
* SubGhz: cleanup dickert mahs code and documentation
* SubGhz: correct type in for statement in dickert mahs
Co-authored-by: あく <alleteam@gmail.com>
* Abstract primitive type from main logic in FuriEventLoop
* Remove message_queue_i.h
* Add stream buffer support for event loop
* Add semaphore support for event loop
* Add temporary unit test workaround
* Make the linter happy
* Add mutex support for event loop
* Implement event subscription and unsubscription while the event loop is running
* Implement edge events
* Fix leftover logical errors
* Add event loop timer example application
* Implement flag-based edge trigger and one-shot mode
* Add event loop mutex example application
* Only notify the event loop if stream buffer is at or above its trigger level
* Reformat comments
* Add event loop stream buffer example application
* Add event loop multiple elements example application
* Improve event loop flag names
* Remove redundant signal handler as it is already handled by the event loop
* Refactor Power service, improve ViewHolder
* Use ViewHolder instead of ViewDispatcher in About app
* Enable ViewDispatcher queue on construction, deprecate view_dispatcher_enable_queue()
* Remove all invocations of view_dispatcher_enable_queue()
* Remove app-scened-template
* Remove missing library from target.json
* Port Accessor app to ViewHolder
* Make the linter happy
* Add example_view_holder application, update ViewHolder docs
* Add example_view_dispatcher application, update ViewDispatcher docs
* Replace FuriSemaphore with FuriApiLock, remove workaround delay
* Fix logical error
* Fix another logical error
* Use the sources directive to speed up compilation
* Use constant define macro
* Improve FuriEventLoop documentation
* Improve FuriEventLoop documentation once more
* Bump API Version
* Gui: remove redundant checks from ViewDispatcher
* Gui: remove dead ifs from ViewDispatcher
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: あく <alleteam@gmail.com>
* Change all icons to be white background
* assets: re-processed all *.png images to 1-bit
* assets: also stripped profile data from .pngs
* assets: also stripped datetime from metadata (`-define png:exclude-chunks=date,time`)
* scripts: added image linter and formatter; fbt: added `lint_img` && `format_img` targets; github: integrated image lint step into CI
* scripts: imglint: fixed deprecation warning
* images: applied `format_img`
* fbt: added `lint_all` and `format_all` targets; docs: updated for new targets
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
* Storage: drop internal storage
* Storage: rollback some unnecessary changes
* Storage: rollback some unnecessary changes part 2
* Storage: cleanup various defines and int handling. Ble: allow short connection interval if internal flash is not used.
* Storage: do not return storage if it is not ready
* Save PIN code to RTC, update settings
* Simplify the code, clean up includes
* Rearrange some code
* apps: storage_move_to_sd: conditionally enable with --extra-define=STORAGE_INT_ON_LFS
* Load Desktop settings automatically
* Redirect /any to /ext
* Abolish storage_move_to_sd app
* Remove as many mentions of ANY_PATH as possible
* Fix desktop settings wrongly not loading
* Improve desktop settings handling and strings
* Load BLE settings and keys automatically
* Improve BLE configuration procedure
* Do not load bluetooth keys twice if they were already loaded
* Load dolphin state automatically
* Fix merge artifact
* Load notification settings automatically
* Update desktop settings strings
* Load expansion settings automatically
* Do not use thread signals to reload desktop settings
* Load region data automatically, separate to its own hook
* Improve ble behaviour with no keys
* Fix Dolphin state not resetting correctly
* Add a status check
* Make Desktop save its own settings
* Check result when taking and releasing mutex
* Improve default thread signal handling in FuriEventLoop
* Make bt service in charge of saving settings, add settings api
* Fix a deadlock due to timer thread not receiving time
* Lock core2 when reinitialising bt
* Update clang-format
* Revert "Update clang-format"
This reverts commit d61295ac063c6ec879375ceeab54d6ff2c90a9a1.
* Format sources with clang-format
* Revert old stack size for desktop settings
* Allocate big struct dynamically
* Simplify PIN comparison
* Save pointer to storage in Desktop object
* Fix region provisioning for hardware regions
* Remove stale TODO + siimplify code
* Clean up region.c
* Use sizeof instead of macro define
* Limit PIN length to 10 for consistency
* Emit a warning upon usage of /any
* Add delay after finding flipper
* Remove unnecessary delay
* Remove all mentions of STORAGE_INT_ON_LFS
* Remove littlefs and internal storage
* Remove all possible LittleFS mentions
* Fix browser tab in Archive
* Ble: fix connection interval explanation
* Bump API Symbols
* BLE: Update comments interval connection comments
* Storage: clear FuriHalRtcFlagStorageFormatInternal if set
---------
Co-authored-by: Georgii Surkov <georgii.surkov@outlook.com>
Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
- Move iso7816 related code to its own folder
- Refactor Iso7816Callback into Iso7816Handler
- Created new file for CCID commands
- Renamed variables according to standard
Co-authored-by: あく <alleteam@gmail.com>
* CCID: Add CCIDWorker
This new thread allows for Flipper to receive CCID messages bigger than CCID_EPSIZE
by receiving multiple packaged in a row and adding them to the buffer
* Fixed data types
* Format sources
* Review feedback
* Variable names
* FuriHal: cleanup and fortify code in furi_hal_usb_ccid
* Review feedbacks (also added extra checks)
* Fixed use after free
* Fix lint
* Sync API Symbols version
* Sync API Symbols version again
* FuriHal: fix clangd warnings, add doxygen comments for furi_hal_usb_ccid.h
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
* CCID: Improve request and response data handling
- Add iso7816_set_response function: serves a helpers to set SW1 and SW2 values
- improved iso7816_read_response_apdu by correctly parsing Lc and Le values
- add client script to make testing easier
* lint and rename
* Format
* Review changes: pragma once, typedef
* Move command/response data and datalen into respective structures
* Remove conditional for Lc=0
* Fix comment: Le
* Make PVS happy and fix spelling
Co-authored-by: あく <alleteam@gmail.com>
* Update api_symbols.csv
* Ultralight C 3des implementation added
* Access check for Ultralight cards is now splitted into 2 functions one for ULC card and another for common
* Ultralight C authentication command handlers added
* Update api_symbols.csv and api_symbols.csv
* Length added to ultralight encrypt function
* New structure for storing 3des key added
* Reseting of 3des_key added
* des_context init/deinit added to poller
* New poller step for ultralight c auth added
* Added ultralight c des key to application
* Renamed felica unlock scenes to more generic des auth scenes, because they are now used also for ultralight c
* Show different menus for different ultralight card types
* Update api_symbols.csv and api_symbols.csv
* Some macro defines added
* Different amount of pages will be now read for ultralight C and others
* New unit test for ultralight C
* Some comments and macro replacements
* New function added to api
* Now all data read checks mfulC separately
* Adjusted listener to handle missing 3des_key properly
* Now poller populates 3des_key after reading with auth to card data
* Nfc: rename _3des_key to tdes_key
* Bump API Symbols
* Mute PVS Warnings
Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
* Implement POC event loop tmers (not all edge cases are handled)
* Use a separate ready list to allow for (re)starting and stopping of timers from callback
* Improve the test application
* Improve timer API and test application
* Improve timeout calculation logic
* Improve timer API, update documentation
* Fix API usage error
* Update doxygen comments
* Revert the old (correct) check
* Improve function naming
* Check whether a timer was on the expired list before processing it
* Implement tick callback
* Add critical sections to improve timer consistency
* Simplify event loop timer API
* Remove redundant search
* Refactor timer logic, use message queue
* Simplify FuriEventLoopTimer API
* Improve event loop timer logic
* Update the f18 target
* Remove superfluous clears
* Correct f18 api symbols
* Fix doxygen comments
* Update .pvsconfig
* Use a double push list instead of deque
* Update .pvsconfig
* Add pending callback functionality
* Restore unprocessed flags when applicable
* Refactor Dolphin app to use FuriEventLoop
* Improve naming
* Update naming some more
* Fix a typo Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
* Fix wait time in example
* Bump API version
* Debug: multiple of 25 timings in event loop blink test
* Separate FuriEventLoopTimer to its own set of files
* Improve start time calculation for periodic timers
* Do not use dynamic allocations for timer requests
* Split the tick functionality in separate files, rearrange code
* Improve timer queue handling
* Properly reset GPIO pins in the test app
* Properly initialise GPIO pins in the test app too
* Furi: variable naming in event loop
* Furi: fix spelling in event loop
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>